cli/js console: if corsDomain is not given to startRpc, we fall back to value set on command line with -corsDomain

This commit is contained in:
zelig
2015-04-22 14:55:01 +01:00
parent 1b7c017076
commit 6b1b5a4a2a
4 changed files with 14 additions and 11 deletions

View File

@ -296,7 +296,7 @@ func console(ctx *cli.Context) {
}
startEth(ctx, ethereum)
repl := newJSRE(ethereum, ctx.String(utils.JSpathFlag.Name), true)
repl := newJSRE(ethereum, ctx.String(utils.JSpathFlag.Name), true, ctx.GlobalString(utils.RPCCORSDomainFlag.Name))
repl.interactive()
ethereum.Stop()
@ -311,7 +311,7 @@ func execJSFiles(ctx *cli.Context) {
}
startEth(ctx, ethereum)
repl := newJSRE(ethereum, ctx.String(utils.JSpathFlag.Name), false)
repl := newJSRE(ethereum, ctx.String(utils.JSpathFlag.Name), false, ctx.GlobalString(utils.RPCCORSDomainFlag.Name))
for _, file := range ctx.Args() {
repl.exec(file)
}