use common.Hash as pool key, no string conversion needed

This commit is contained in:
zelig
2015-03-20 11:57:47 +00:00
parent d7564a9a25
commit 66b29899c4
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ func (self *section) addSectionToBlockChain(p *peer) {
var nodes []*node
var n *node
var keys []string
var keys []common.Hash
var blocks []*types.Block
for self.poolRootIndex > 0 {
n = self.nodes[self.poolRootIndex-1]
@@ -117,7 +117,7 @@ func (self *section) addSectionToBlockChain(p *peer) {
break
}
self.poolRootIndex--
keys = append(keys, n.hash.Str())
keys = append(keys, n.hash)
blocks = append(blocks, block)
nodes = append(nodes, n)
}