OSDN Git Service

Del signature from cache when added to the block (#258)
[bytom/vapor.git] / protocol / bbft.go
index 70b1d81..11dc0db 100644 (file)
@@ -132,6 +132,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.signatureCache.Remove(cachekey)
                        } else {
                                continue
                        }