@@ -157,8 +157,8 @@ type BlockPool struct {
157157 tdSub event.Subscription // subscription to core.ChainHeadEvent
158158 td * big.Int // our own total difficulty
159159
160- pool map [string ]* entry // the actual blockpool
161- peers * peers // peers manager in peers.go
160+ pool map [common. Hash ]* entry // the actual blockpool
161+ peers * peers // peers manager in peers.go
162162
163163 status * status // info about blockpool (UI interface) in status.go
164164
@@ -210,7 +210,7 @@ func (self *BlockPool) Start() {
210210 self .hashSlicePool = make (chan []common.Hash , 150 )
211211 self .status = newStatus ()
212212 self .quit = make (chan bool )
213- self .pool = make (map [string ]* entry )
213+ self .pool = make (map [common. Hash ]* entry )
214214 self .running = true
215215
216216 self .peers = & peers {
@@ -789,13 +789,13 @@ func (self *BlockPool) getChild(sec *section) *section {
789789func (self * BlockPool ) get (hash common.Hash ) * entry {
790790 self .lock .RLock ()
791791 defer self .lock .RUnlock ()
792- return self .pool [hash . Str () ]
792+ return self .pool [hash ]
793793}
794794
795795func (self * BlockPool ) set (hash common.Hash , e * entry ) {
796796 self .lock .Lock ()
797797 defer self .lock .Unlock ()
798- self .pool [hash . Str () ] = e
798+ self .pool [hash ] = e
799799}
800800
801801// accessor and setter for total difficulty
@@ -817,7 +817,7 @@ func (self *BlockPool) remove(sec *section) {
817817 defer self .lock .Unlock ()
818818
819819 for _ , node := range sec .nodes {
820- delete (self .pool , node .hash . Str () )
820+ delete (self .pool , node .hash )
821821 }
822822 if sec .initialised && sec .poolRootIndex != 0 {
823823 self .status .lock .Lock ()
0 commit comments