mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
cmd/geth, cmd/utils: Fixed minor issues
This commit is contained in:
parent
78494d7ec2
commit
d0481a5cc7
2 changed files with 7 additions and 14 deletions
|
|
@ -84,8 +84,8 @@ var (
|
|||
utils.TxPoolAccountQueueFlag,
|
||||
utils.TxPoolGlobalQueueFlag,
|
||||
utils.TxPoolLifetimeFlag,
|
||||
utils.ExitWhenSyncedFlag,
|
||||
utils.SyncModeFlag,
|
||||
utils.ExitWhenSyncedFlag,
|
||||
utils.GCModeFlag,
|
||||
utils.LightServFlag,
|
||||
utils.LightPeersFlag,
|
||||
|
|
@ -339,24 +339,18 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
if err := stack.Service(&lightEthereum); err != nil {
|
||||
utils.Fatalf("LightEthereum service not running: %v", err)
|
||||
}
|
||||
var mux = stack.EventMux()
|
||||
var sub = mux.Subscribe(downloader.DoneEvent{})
|
||||
<-sub.Chan()
|
||||
log.Info("Synchronisation completed, exitting", "countdown", exitWhenSynced)
|
||||
time.Sleep(exitWhenSynced)
|
||||
stack.Stop()
|
||||
} else {
|
||||
var ethereum *eth.Ethereum
|
||||
if err := stack.Service(ðereum); err != nil {
|
||||
utils.Fatalf("Ethereum service not running: %v", err)
|
||||
}
|
||||
}
|
||||
var mux = stack.EventMux()
|
||||
var sub = mux.Subscribe(downloader.DoneEvent{})
|
||||
<-sub.Chan()
|
||||
log.Info("Synchronisation completed, exitting", "countdown", exitWhenSynced)
|
||||
time.Sleep(exitWhenSynced)
|
||||
stack.Stop()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1156,7 +1156,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
|||
if ctx.GlobalIsSet(NetworkIdFlag.Name) {
|
||||
cfg.NetworkId = ctx.GlobalUint64(NetworkIdFlag.Name)
|
||||
}
|
||||
cfg.ExitWhenSynced = ctx.GlobalDuration(ExitWhenSyncedFlag.Name)
|
||||
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheDatabaseFlag.Name) {
|
||||
cfg.DatabaseCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheDatabaseFlag.Name) / 100
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue