From 695ef3e26fc9e184258b9b68a8249dc44b24e7e0 Mon Sep 17 00:00:00 2001 From: Paladz Date: Fri, 12 Jul 2019 21:38:00 +0800 Subject: [PATCH] try to fix ban peer bug (#273) --- protocol/bbft.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/bbft.go b/protocol/bbft.go index f8658979..a6a6debb 100644 --- a/protocol/bbft.go +++ b/protocol/bbft.go @@ -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 -- 2.11.0