OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15ef498
)
add parse env for url
author
wz
<mars@bytom.io>
Mon, 16 Apr 2018 01:48:27 +0000
(09:48 +0800)
committer
wz
<mars@bytom.io>
Mon, 16 Apr 2018 05:05:05 +0000
(13:05 +0800)
node/node.go
patch
|
blob
|
history
util/util.go
patch
|
blob
|
history
diff --git
a/node/node.go
b/node/node.go
index
3d0dc79
..
12dd442
100644
(file)
--- a/
node/node.go
+++ b/
node/node.go
@@
-189,6
+189,7
@@
func (n *Node) initAndstartApiServer() {
n.api = api.NewAPI(n.syncManager, n.wallet, n.txfeed, n.cpuMiner, n.miningPool, n.chain, n.config, n.accessTokens)
listenAddr := env.String("LISTEN", n.config.ApiAddress)
+ env.Parse()
n.api.StartServer(*listenAddr)
}
diff --git
a/util/util.go
b/util/util.go
index
5222373
..
8c8d598
100644
(file)
--- a/
util/util.go
+++ b/
util/util.go
@@
-29,6
+29,7
@@
var (
// Wraper rpc's client
func MustRPCClient() *rpc.Client {
+ env.Parse()
return &rpc.Client{BaseURL: *coreURL}
}