added batch support to console and attach actions

This commit is contained in:
Bas van Kervel
2015-06-19 14:04:18 +02:00
committed by Bas van Kervel
parent 3ff272b618
commit f87501b1c5
6 changed files with 62 additions and 30 deletions

View File

@ -255,6 +255,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.IPCDisabledFlag,
utils.IPCApiFlag,
utils.IPCPathFlag,
utils.ExecFlag,
utils.WhisperEnabledFlag,
utils.VMDebugFlag,
utils.ProtocolVersionFlag,
@ -337,8 +338,12 @@ func attach(ctx *cli.Context) {
true,
nil)
repl.welcome()
repl.interactive()
if ctx.GlobalString(utils.ExecFlag.Name) != "" {
repl.batch(ctx.GlobalString(utils.ExecFlag.Name))
} else {
repl.welcome()
repl.interactive()
}
}
func console(ctx *cli.Context) {
@ -368,8 +373,12 @@ func console(ctx *cli.Context) {
nil,
)
repl.welcome()
repl.interactive()
if ctx.GlobalString(utils.ExecFlag.Name) != "" {
repl.batch(ctx.GlobalString(utils.ExecFlag.Name))
} else {
repl.welcome()
repl.interactive()
}
ethereum.Stop()
ethereum.WaitForShutdown()