Golang implemented sidechain for Bytom
Revision | f13b0c08f04e10bfa147a95ebb41b4447e5a1f1f (tree) |
---|---|
Time | 2019-07-12 20:47:53 |
Author | paladz <453256728@qq.c...> |
Commiter | paladz |
try to fix ban peer bug
@@ -133,7 +133,7 @@ func (c *Chain) validateSign(block *types.Block) error { | ||
133 | 133 | cachekey := signCacheKey(blockHash.String(), pubKey) |
134 | 134 | if signature, ok := c.signatureCache.Get(cachekey); ok { |
135 | 135 | block.Set(node.Order, signature.([]byte)) |
136 | - c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: []byte(pubKey)}) | |
136 | + c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: node.XPub[:]}) | |
137 | 137 | c.signatureCache.Remove(cachekey) |
138 | 138 | } else { |
139 | 139 | continue |