diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ethereum/flags.go | 6 | ||||
-rw-r--r-- | cmd/ethereum/main.go | 3 | ||||
-rw-r--r-- | cmd/ethereum/repl/repl.go | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 7d410c8e4..c42083160 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -135,6 +135,12 @@ func Init() { flag.Parse() + // When the javascript console is started log to a file instead + // of stdout + if StartJsConsole { + LogFile = path.Join(Datadir, "ethereum.log") + } + var err error if NAT, err = nat.Parse(*natstr); err != nil { log.Fatalf("-nat: %v", err) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 45e6f7b93..1562165cd 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -137,6 +137,9 @@ func main() { utils.StartEthereum(ethereum) + latestBlock := ethereum.ChainManager().CurrentBlock() + fmt.Printf("Welcome to the FRONTIER\n") + if StartJsConsole { InitJsConsole(ethereum) } else if len(InputFile) > 0 { diff --git a/cmd/ethereum/repl/repl.go b/cmd/ethereum/repl/repl.go index 4a7880ff4..11b812617 100644 --- a/cmd/ethereum/repl/repl.go +++ b/cmd/ethereum/repl/repl.go @@ -60,6 +60,7 @@ func (self *JSRepl) Start() { if !self.running { self.running = true repllogger.Infoln("init JS Console") + reader := bufio.NewReader(self.history) for { line, err := reader.ReadString('\n') |