mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
changes
This commit is contained in:
commit
554f07b16e
8 changed files with 113 additions and 33 deletions
|
|
@ -56,7 +56,6 @@ Go Expanse comes with several wrappers/executables found in
|
||||||
|
|
||||||
To get the options available:
|
To get the options available:
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
geth help
|
geth help
|
||||||
|
|
||||||
For further details on options, see the [wiki](https://github.com/expanse-project/go-expanse/wiki/Command-Line-Options)
|
For further details on options, see the [wiki](https://github.com/expanse-project/go-expanse/wiki/Command-Line-Options)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
<<<<<<< HEAD
|
|
||||||
echo "" > coverage.txt
|
echo "" > coverage.txt
|
||||||
|
|
||||||
for d in $(find ./* -maxdepth 10 -type d -not -path "./build" -not -path "./Godeps/*" ); do
|
for d in $(find ./* -maxdepth 10 -type d -not -path "./build" -not -path "./Godeps/*" ); do
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ func apiWordCompleter(line string, pos int) (head string, completions []string,
|
||||||
return begin, completionWords, end
|
return begin, completionWords, end
|
||||||
}
|
}
|
||||||
|
|
||||||
func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive bool) *jsre {
|
func newLightweightJSRE(libPath string, client comms.ExpanseClient, interactive bool) *jsre {
|
||||||
js := &jsre{ps1: "> "}
|
js := &jsre{ps1: "> "}
|
||||||
js.wait = make(chan *big.Int)
|
js.wait = make(chan *big.Int)
|
||||||
js.client = client
|
js.client = client
|
||||||
|
|
@ -330,7 +330,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
|
||||||
utils.Fatalf("Error setting namespaces: %v", err)
|
utils.Fatalf("Error setting namespaces: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
js.re.Run(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
|
js.re.Run(`var GlobalRegistrar = exp.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -518,12 +518,12 @@ func StartIPC(exp *exp.Expanse, ctx *cli.Context) error {
|
||||||
Endpoint: IpcSocketPath(ctx),
|
Endpoint: IpcSocketPath(ctx),
|
||||||
}
|
}
|
||||||
|
|
||||||
initializer := func(conn net.Conn) (shared.EthereumApi, error) {
|
initializer := func(conn net.Conn) (shared.ExpanseApi, error) {
|
||||||
fe := useragent.NewRemoteFrontend(conn, eth.AccountManager())
|
fe := useragent.NewRemoteFrontend(conn, eth.AccountManager())
|
||||||
xeth := xeth.New(eth, fe)
|
xeth := xeth.New(exp, fe)
|
||||||
codec := codec.JSON
|
codec := codec.JSON
|
||||||
|
|
||||||
apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth)
|
apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, exp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -370,14 +370,14 @@ func New(config *Config) (*Expanse, error) {
|
||||||
}
|
}
|
||||||
exp.txPool = core.NewTxPool(exp.EventMux(), exp.chainManager.State, exp.chainManager.GasLimit)
|
exp.txPool = core.NewTxPool(exp.EventMux(), exp.chainManager.State, exp.chainManager.GasLimit)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD:exp/backend.go
|
||||||
exp.blockProcessor = core.NewBlockProcessor(chainDb, exp.pow, exp.chainManager, exp.EventMux())
|
exp.blockProcessor = core.NewBlockProcessor(chainDb, exp.pow, exp.chainManager, exp.EventMux())
|
||||||
exp.chainManager.SetProcessor(exp.blockProcessor)
|
exp.chainManager.SetProcessor(exp.blockProcessor)
|
||||||
exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, eth.txPool, exp.pow, exp.chainManager)
|
exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, eth.txPool, exp.pow, exp.chainManager)
|
||||||
|
|
||||||
eth.miner = miner.New(eth, eth.EventMux(), eth.pow)
|
exp.miner = miner.New(eth, exp.EventMux(), exp.pow)
|
||||||
eth.miner.SetGasPrice(config.GasPrice)
|
exp.miner.SetGasPrice(config.GasPrice)
|
||||||
eth.miner.SetExtra(config.ExtraData)
|
exp.miner.SetExtra(config.ExtraData)
|
||||||
|
|
||||||
if config.Shh {
|
if config.Shh {
|
||||||
exp.whisper = whisper.New()
|
exp.whisper = whisper.New()
|
||||||
|
|
@ -531,7 +531,7 @@ func (s *Expanse) NetVersion() int { return s.netVersionId
|
||||||
func (s *Expanse) ShhVersion() int { return s.shhVersionId }
|
func (s *Expanse) ShhVersion() int { return s.shhVersionId }
|
||||||
func (s *Expanse) Downloader() *downloader.Downloader { return s.protocolManager.downloader }
|
func (s *Expanse) Downloader() *downloader.Downloader { return s.protocolManager.downloader }
|
||||||
|
|
||||||
// Start the ethereum
|
// Start the expanse
|
||||||
func (s *Expanse) Start() error {
|
func (s *Expanse) Start() error {
|
||||||
jsonlogger.LogJson(&logger.LogStarting{
|
jsonlogger.LogJson(&logger.LogStarting{
|
||||||
ClientString: s.net.Name,
|
ClientString: s.net.Name,
|
||||||
|
|
|
||||||
29
fdtrack/fdusage.go
Normal file
29
fdtrack/fdusage.go
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2015 The go-expanse Authors
|
||||||
|
// This file is part of the go-expanse library.
|
||||||
|
//
|
||||||
|
// The go-expanse library is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// The go-expanse library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
// +build !linux,!darwin
|
||||||
|
|
||||||
|
package fdtrack
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
func fdlimit() int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func fdusage() (int, error) {
|
||||||
|
return 0, errors.New("not implemented")
|
||||||
|
}
|
||||||
53
fdtrack/fdusage_linux.go
Normal file
53
fdtrack/fdusage_linux.go
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
// Copyright 2015 The go-expanse Authors
|
||||||
|
// This file is part of the go-expanse library.
|
||||||
|
//
|
||||||
|
// The go-expanse library is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// The go-expanse library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
// +build linux
|
||||||
|
|
||||||
|
package fdtrack
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"syscall"
|
||||||
|
)
|
||||||
|
|
||||||
|
func fdlimit() int {
|
||||||
|
var nofile syscall.Rlimit
|
||||||
|
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &nofile); err != nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return int(nofile.Cur)
|
||||||
|
}
|
||||||
|
|
||||||
|
func fdusage() (int, error) {
|
||||||
|
f, err := os.Open("/proc/self/fd")
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
const batchSize = 100
|
||||||
|
n := 0
|
||||||
|
for {
|
||||||
|
list, err := f.Readdirnames(batchSize)
|
||||||
|
n += len(list)
|
||||||
|
if err == io.EOF {
|
||||||
|
break
|
||||||
|
} else if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n, nil
|
||||||
|
}
|
||||||
|
|
@ -3105,7 +3105,7 @@ SolidityEvent.prototype.types = function (indexed) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be used to get event display name
|
* Exp methods and properties
|
||||||
*
|
*
|
||||||
* @method displayName
|
* @method displayName
|
||||||
* @return {String} event display name
|
* @return {String} event display name
|
||||||
|
|
@ -4374,20 +4374,20 @@ module.exports = Iban;
|
||||||
|
|
||||||
},{"bignumber.js":"bignumber.js"}],33:[function(require,module,exports){
|
},{"bignumber.js":"bignumber.js"}],33:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of expanse.js.
|
||||||
|
|
||||||
ethereum.js is free software: you can redistribute it and/or modify
|
expanse.js is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ethereum.js is distributed in the hope that it will be useful,
|
expanse.js is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Lesser General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
along with expanse.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/** @file ipcprovider.js
|
/** @file ipcprovider.js
|
||||||
* @authors:
|
* @authors:
|
||||||
|
|
@ -4594,20 +4594,20 @@ module.exports = IpcProvider;
|
||||||
|
|
||||||
},{"../utils/utils":20,"./errors":26}],34:[function(require,module,exports){
|
},{"../utils/utils":20,"./errors":26}],34:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of expanse.js.
|
||||||
|
|
||||||
ethereum.js is free software: you can redistribute it and/or modify
|
expanse.js is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ethereum.js is distributed in the hope that it will be useful,
|
expanse.js is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Lesser General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
along with expanse.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/** @file jsonrpc.js
|
/** @file jsonrpc.js
|
||||||
* @authors:
|
* @authors:
|
||||||
|
|
@ -4687,20 +4687,20 @@ module.exports = Jsonrpc;
|
||||||
|
|
||||||
},{}],35:[function(require,module,exports){
|
},{}],35:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of expanse.js.
|
||||||
|
|
||||||
ethereum.js is free software: you can redistribute it and/or modify
|
expanse.js is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ethereum.js is distributed in the hope that it will be useful,
|
expanse.js is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Lesser General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
along with expanse.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @file method.js
|
* @file method.js
|
||||||
|
|
@ -4861,20 +4861,20 @@ module.exports = Method;
|
||||||
|
|
||||||
},{"../utils/utils":20,"./errors":26,"./requestmanager":43}],36:[function(require,module,exports){
|
},{"../utils/utils":20,"./errors":26,"./requestmanager":43}],36:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of expanse.js.
|
||||||
|
|
||||||
ethereum.js is free software: you can redistribute it and/or modify
|
expanse.js is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ethereum.js is distributed in the hope that it will be useful,
|
expanse.js is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Lesser General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
along with expanse.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/** @file db.js
|
/** @file db.js
|
||||||
* @authors:
|
* @authors:
|
||||||
|
|
@ -4919,20 +4919,20 @@ module.exports = {
|
||||||
|
|
||||||
},{"../method":35}],37:[function(require,module,exports){
|
},{"../method":35}],37:[function(require,module,exports){
|
||||||
/*
|
/*
|
||||||
This file is part of ethereum.js.
|
This file is part of expanse.js.
|
||||||
|
|
||||||
ethereum.js is free software: you can redistribute it and/or modify
|
expanse.js is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ethereum.js is distributed in the hope that it will be useful,
|
expanse.js is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Lesser General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
|
along with expanse.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @file eth.js
|
* @file eth.js
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue