Updated to reflect BlockChain changes

This commit is contained in:
obscuren
2014-10-20 12:03:31 +02:00
parent 82a2e4fe28
commit 6ea44c466a
6 changed files with 17 additions and 17 deletions

View File

@ -139,10 +139,10 @@ func (self *JSRE) dump(call otto.FunctionCall) otto.Value {
var block *ethchain.Block
if call.Argument(0).IsNumber() {
num, _ := call.Argument(0).ToInteger()
block = self.ethereum.BlockChain().GetBlockByNumber(uint64(num))
block = self.ethereum.ChainManager().GetBlockByNumber(uint64(num))
} else if call.Argument(0).IsString() {
hash, _ := call.Argument(0).ToString()
block = self.ethereum.BlockChain().GetBlock(ethutil.Hex2Bytes(hash))
block = self.ethereum.ChainManager().GetBlock(ethutil.Hex2Bytes(hash))
} else {
fmt.Println("invalid argument for dump. Either hex string or number")
}