Added block by number

pull/150/head
obscuren 10 years ago
parent 55a2f35a64
commit 89c442cadb
  1. 8
      ethpipe/js_pipe.go

@ -28,6 +28,14 @@ func (self *JSPipe) BlockByHash(strHash string) *JSBlock {
return NewJSBlock(block)
}
func (self *JSPipe) GetBlockByNumber(num int32) *JSBlock {
if num == -1 {
return NewJSBlock(self.obj.BlockChain().CurrentBlock)
}
return NewJSBlock(self.obj.BlockChain().GetBlockByNumber(uint64(num)))
}
func (self *JSPipe) Key() *JSKey {
return NewJSKey(self.obj.KeyManager().KeyPair())
}

Loading…
Cancel
Save