From c3f49b715845ecbadcc21b1b77c821f4d58f93cd Mon Sep 17 00:00:00 2001 From: Tuna Date: Thu, 16 Aug 2018 17:13:32 +0700 Subject: [PATCH] hotfix - bypass signer check at CP header --- consensus/clique/clique.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 0a653c8531..ec7c5f4139 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -350,22 +350,6 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type if parent.Time.Uint64()+c.config.Period > header.Time.Uint64() { return ErrInvalidTimestamp } - // Retrieve the snapshot needed to verify this header and cache it - snap, err := c.snapshot(chain, number-1, header.ParentHash, parents) - if err != nil { - return err - } - // If the block is a checkpoint block, verify the signer list - if number%c.config.Epoch == 0 { - signers := make([]byte, len(snap.Signers)*common.AddressLength) - for i, signer := range snap.signers() { - copy(signers[i*common.AddressLength:], signer[:]) - } - extraSuffix := len(header.Extra) - extraSeal - if !bytes.Equal(header.Extra[extraVanity:extraSuffix], signers) { - return errInvalidCheckpointSigners - } - } // All basic checks passed, verify the seal and return return c.verifySeal(chain, header, parents) }