Skip to content

Commit

Permalink
pass network specific activeset parameters to proposal builder (#5804)
Browse files Browse the repository at this point in the history
without this config activeset can't be built in advance, 
it is right now not a big deal since we are using trusted fallback, 
but should be using correct config regardless
  • Loading branch information
dshulyak committed Apr 16, 2024
1 parent 97fad81 commit 0193a7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions miner/proposal_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func WithSigners(signers ...*signing.EdSigner) Opt {
}
}

// WithActiveSetPrepation overwrites configuration for activeset preparation.
func WithActiveSetPrepation(prep ActiveSetPreparation) Opt {
// WithActivesetPreparation overwrites configuration for activeset preparation.
func WithActivesetPreparation(prep ActiveSetPreparation) Opt {
return func(pb *ProposalBuilder) {
pb.cfg.activeSet = prep
}
Expand Down
2 changes: 1 addition & 1 deletion miner/proposal_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ func TestStartStop(t *testing.T) {
syncer,
conState,
WithLogger(logtest.New(t)),
WithActiveSetPrepation(ActiveSetPreparation{}),
WithActivesetPreparation(ActiveSetPreparation{}),
)
builder.Register(signer)
var (
Expand Down
1 change: 1 addition & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ func (app *App) initServices(ctx context.Context) error {
miner.WithNetworkDelay(app.Config.ATXGradeDelay),
miner.WithMinGoodAtxPercent(minerGoodAtxPct),
miner.WithLogger(app.addLogger(ProposalBuilderLogger, lg)),
miner.WithActivesetPreparation(app.Config.ActiveSet),
)
for _, sig := range app.signers {
proposalBuilder.Register(sig)
Expand Down

0 comments on commit 0193a7f

Please sign in to comment.