From 37935bb29f8bef8b582a0dd7c1fd3587de2235ba Mon Sep 17 00:00:00 2001 From: Edgar Aroutiounian Date: Tue, 10 Dec 2019 18:17:23 -0800 Subject: [PATCH] [engine] Set ShardID Provider in VerifyWithSignature (#2005) --- internal/chain/engine.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/chain/engine.go b/internal/chain/engine.go index 9c1bb14c4..dda4af5f1 100644 --- a/internal/chain/engine.go +++ b/internal/chain/engine.go @@ -352,6 +352,12 @@ func (e *engineImpl) VerifyHeaderWithSignature(chain engine.ChainReader, header return errors.Wrapf(err, "cannot read shard state") } d := quorum.NewDecider(quorum.SuperMajorityStake) + d.SetShardIDProvider(func() (uint32, error) { + return header.ShardID(), nil + }) + d.SetMyPublicKeyProvider(func() (*bls.PublicKey, error) { + return nil, nil + }) d.SetVoters(slotList.FindCommitteeByID(header.ShardID()).Slots) if !d.IsQuorumAchievedByMask(mask) { return ctxerror.New(