diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-06-10 17:29:52 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2015-06-11 20:01:41 +0800 |
commit | bd38428f33b127e9c60d26127695e50c55798fcd (patch) | |
tree | 9bb838822fc3d1b28775f57223a30a243d4df9f2 /cmd | |
parent | 87b62f75a7b9c15c17f3352f1b50ad88966e7070 (diff) | |
download | dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.gz dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.zst dexon-bd38428f33b127e9c60d26127695e50c55798fcd.zip |
cleanup of javascript API
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/console/js.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/console/js.go b/cmd/console/js.go index 4229a95a2..76695cabd 100644 --- a/cmd/console/js.go +++ b/cmd/console/js.go @@ -32,12 +32,12 @@ import ( "github.com/ethereum/go-ethereum/common/docserver" re "github.com/ethereum/go-ethereum/jsre" "github.com/ethereum/go-ethereum/rpc" + "github.com/ethereum/go-ethereum/rpc/api" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/comms" "github.com/ethereum/go-ethereum/rpc/shared" "github.com/peterh/liner" "github.com/robertkrimen/otto" - "github.com/ethereum/go-ethereum/rpc/api" ) type prompter interface { @@ -235,6 +235,7 @@ func (self *jsre) suportedApis(ipcpath string) ([]string, error) { // show summary of current geth instance func (self *jsre) welcome(ipcpath string) { self.re.Eval(`console.log('instance: ' + web3.version.client);`) + self.re.Eval(`console.log(' datadir: ' + admin.datadir);`) self.re.Eval(`console.log("coinbase: " + eth.coinbase);`) self.re.Eval(`var lastBlockTimestamp = 1000 * eth.getBlock(eth.blockNumber).timestamp`) self.re.Eval(`console.log("at block: " + eth.blockNumber + " (" + new Date(lastBlockTimestamp).toLocaleDateString() |