[cleanup] move enableGC outside of setupGenesisAccount

Signed-off-by: Leo Chen <leo@harmony.one>
pull/1224/head
Leo Chen 5 years ago
parent 4f9eb1a45a
commit c81fdbd0aa
  1. 10
      cmd/harmony/main.go

@ -193,11 +193,6 @@ func setupGenesisAccount() (isLeader bool) {
fmt.Printf("My Genesis Account: %v\n", *genesisAccount)
// Set up manual call for garbage collection.
if *enableGC {
memprofiling.MaybeCallGCPeriodically()
}
return isLeader
}
@ -440,6 +435,11 @@ func main() {
initSetup()
// Set up manual call for garbage collection.
if *enableGC {
memprofiling.MaybeCallGCPeriodically()
}
isLeader := false
if !*isExplorer { // Explorer node doesn't need the following setup
isLeader = setupGenesisAccount()

Loading…
Cancel
Save