aboutsummaryrefslogtreecommitdiffstats
path: root/block_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-17 21:58:02 +0800
committerobscuren <geffobscura@gmail.com>2014-09-17 21:58:02 +0800
commita26c479182375a076833068aa6125724fda647fe (patch)
tree4171e5aa08190159306100903cbcec9045eec59d /block_pool.go
parent9559b5322857edfc819f7888a791d4f2a396fd17 (diff)
downloadgo-tangerine-a26c479182375a076833068aa6125724fda647fe.tar
go-tangerine-a26c479182375a076833068aa6125724fda647fe.tar.gz
go-tangerine-a26c479182375a076833068aa6125724fda647fe.tar.bz2
go-tangerine-a26c479182375a076833068aa6125724fda647fe.tar.lz
go-tangerine-a26c479182375a076833068aa6125724fda647fe.tar.xz
go-tangerine-a26c479182375a076833068aa6125724fda647fe.tar.zst
go-tangerine-a26c479182375a076833068aa6125724fda647fe.zip
Added len
Diffstat (limited to 'block_pool.go')
-rw-r--r--block_pool.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/block_pool.go b/block_pool.go
index 0a668e111..6753308b6 100644
--- a/block_pool.go
+++ b/block_pool.go
@@ -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
}