Added len

This commit is contained in:
obscuren
2014-09-17 15:58:02 +02:00
parent 9559b53228
commit a26c479182
2 changed files with 45 additions and 9 deletions

View File

@ -33,6 +33,10 @@ func NewBlockPool(eth *Ethereum) *BlockPool {
}
}
func (self *BlockPool) Len() int {
return len(self.hashPool)
}
func (self *BlockPool) HasLatestHash() bool {
return self.pool[string(self.eth.BlockChain().CurrentBlock.Hash())] != nil
}