OSDN Git Service

try to fix ban peer bug (#273)
[bytom/vapor.git] / protocol / bbft.go
index f865897..a6a6deb 100644 (file)
@@ -133,7 +133,7 @@ func (c *Chain) validateSign(block *types.Block) error {
                        cachekey := signCacheKey(blockHash.String(), pubKey)
                        if signature, ok := c.signatureCache.Get(cachekey); ok {
                                block.Set(node.Order, signature.([]byte))
-                               c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: []byte(pubKey)})
+                               c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: node.XPub[:]})
                                c.signatureCache.Remove(cachekey)
                        } else {
                                continue