diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-03 03:13:41 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-03 03:13:41 +0800 |
commit | af6971f823431e091142dc81f1b252f681d086cf (patch) | |
tree | 2b34e0f42adaeebcf28c955249934f7dc5270792 /cmd/utils/cmd.go | |
parent | a60a18b080197cad836f18f9d093bba3bcb6cef8 (diff) | |
parent | 65cad14f9b27db396d036f47814d4843d947ac43 (diff) | |
download | dexon-af6971f823431e091142dc81f1b252f681d086cf.tar dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.gz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.bz2 dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.lz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.xz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.zst dexon-af6971f823431e091142dc81f1b252f681d086cf.zip |
Merge remote-tracking branch 'upstream/develop' into blockpool2
Diffstat (limited to 'cmd/utils/cmd.go')
-rw-r--r-- | cmd/utils/cmd.go | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index bc8fafafb..5c7ec3221 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -25,12 +25,8 @@ import ( "fmt" "os" "os/signal" - "path" - "path/filepath" "regexp" - "runtime" - "bitbucket.org/kardianos/osext" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" @@ -132,31 +128,6 @@ func StartEthereum(ethereum *eth.Ethereum) { }) } -func DefaultAssetPath() string { - var assetPath string - // If the current working directory is the go-ethereum dir - // assume a debug build and use the source directory as - // asset directory. - pwd, _ := os.Getwd() - if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") { - assetPath = path.Join(pwd, "assets") - } else { - switch runtime.GOOS { - case "darwin": - // Get Binary Directory - exedir, _ := osext.ExecutableFolder() - assetPath = filepath.Join(exedir, "../Resources") - case "linux": - assetPath = "/usr/share/mist" - case "windows": - assetPath = "./assets" - default: - assetPath = "." - } - } - return assetPath -} - func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, SecretFile string, ExportDir string, NonInteractive bool) { var err error @@ -189,9 +160,9 @@ func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, Secre clilogger.Infof("Main address %x\n", keyManager.Address()) } -func StartRpc(ethereum *eth.Ethereum, RpcPort int) { +func StartRpc(ethereum *eth.Ethereum, RpcListenAddress string, RpcPort int) { var err error - ethereum.RpcServer, err = rpchttp.NewRpcHttpServer(xeth.New(ethereum), RpcPort) + ethereum.RpcServer, err = rpchttp.NewRpcHttpServer(xeth.New(ethereum), RpcListenAddress, RpcPort) if err != nil { clilogger.Errorf("Could not start RPC interface (port %v): %v", RpcPort, err) } else { |