Renamed block_chain to chain_manager

This commit is contained in:
obscuren
2014-10-20 11:53:11 +02:00
parent 33ca8d7b8f
commit 097ba56df5
14 changed files with 77 additions and 113 deletions

View File

@@ -21,17 +21,17 @@ func NewJSPipe(eth ethchain.EthManager) *JSPipe {
func (self *JSPipe) BlockByHash(strHash string) *JSBlock {
hash := ethutil.Hex2Bytes(strHash)
block := self.obj.BlockChain().GetBlock(hash)
block := self.obj.ChainManager().GetBlock(hash)
return NewJSBlock(block)
}
func (self *JSPipe) BlockByNumber(num int32) *JSBlock {
if num == -1 {
return NewJSBlock(self.obj.BlockChain().CurrentBlock)
return NewJSBlock(self.obj.ChainManager().CurrentBlock)
}
return NewJSBlock(self.obj.BlockChain().GetBlockByNumber(uint64(num)))
return NewJSBlock(self.obj.ChainManager().GetBlockByNumber(uint64(num)))
}
func (self *JSPipe) Block(v interface{}) *JSBlock {