Skip to content

Commit

Permalink
rm CommitteeChain.signerThreshold
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu committed Sep 21, 2024
1 parent 9326a11 commit 2c519a2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions beacon/light/committee_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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,
Expand Down

0 comments on commit 2c519a2

Please sign in to comment.