From 2c519a2ed1f74cc5452934c31a30610a440de675 Mon Sep 17 00:00:00 2001 From: alan <652732310@qq.com> Date: Sat, 21 Sep 2024 16:14:38 +0800 Subject: [PATCH] rm CommitteeChain.signerThreshold --- beacon/light/committee_chain.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/beacon/light/committee_chain.go b/beacon/light/committee_chain.go index a8d032bb65c5..778cd3028f76 100644 --- a/beacon/light/committee_chain.go +++ b/beacon/light/committee_chain.go @@ -77,7 +77,6 @@ type CommitteeChain struct { sigVerifier committeeSigVerifier // BLS sig verifier (dummy verifier in tests) config *types.ChainConfig - signerThreshold int minimumUpdateScore types.UpdateScore enforceTime bool // enforceTime specifies whether the age of a signed header should be checked } @@ -96,14 +95,13 @@ func NewTestCommitteeChain(db ethdb.KeyValueStore, config *types.ChainConfig, si // clock source and signature verification for testing purposes. func newCommitteeChain(db ethdb.KeyValueStore, config *types.ChainConfig, signerThreshold int, enforceTime bool, sigVerifier committeeSigVerifier, clock mclock.Clock, unixNano func() int64) *CommitteeChain { s := &CommitteeChain{ - committeeCache: lru.NewCache[uint64, syncCommittee](10), - db: db, - sigVerifier: sigVerifier, - clock: clock, - unixNano: unixNano, - config: config, - signerThreshold: signerThreshold, - enforceTime: enforceTime, + committeeCache: lru.NewCache[uint64, syncCommittee](10), + db: db, + sigVerifier: sigVerifier, + clock: clock, + unixNano: unixNano, + config: config, + enforceTime: enforceTime, minimumUpdateScore: types.UpdateScore{ SignerCount: uint32(signerThreshold), SubPeriodIndex: params.SyncPeriodLength / 16,