jsre executes js file AFTER ethereum starts (allows scripted add peer without wait, etc)

This commit is contained in:
zelig 2015-01-02 20:32:43 +00:00
parent c610c53a9e
commit 53aa639c51

View file

@ -124,13 +124,6 @@ func main() {
return
}
// better reworked as cases
if StartJsConsole {
InitJsConsole(ethereum)
} else if len(InputFile) > 0 {
ExecJsFile(ethereum, InputFile)
}
if StartRpc {
utils.StartRpc(ethereum, RpcPort)
}
@ -141,6 +134,11 @@ func main() {
utils.StartEthereum(ethereum, UseSeed)
if StartJsConsole {
InitJsConsole(ethereum)
} else if len(InputFile) > 0 {
ExecJsFile(ethereum, InputFile)
}
// this blocks the thread
ethereum.WaitForShutdown()
}