Skip to content

Commit

Permalink
remove trivial helper (#12443)
Browse files Browse the repository at this point in the history
  • Loading branch information
potuz authored May 22, 2023
1 parent 8dfb92c commit c80019b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 1 addition & 3 deletions beacon-chain/forkchoice/doubly-linked-tree/on_tick.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ import (
// store.justified_checkpoint = store.best_justified_checkpoint
func (f *ForkChoice) NewSlot(ctx context.Context, slot primitives.Slot) error {
// Reset proposer boost root
if err := f.resetBoostedProposerRoot(ctx); err != nil {
return errors.Wrap(err, "could not reset boosted proposer root in fork choice")
}
f.store.proposerBoostRoot = [32]byte{}

// Return if it's not a new epoch.
if !slots.IsEpochStart(slot) {
Expand Down
7 changes: 0 additions & 7 deletions beacon-chain/forkchoice/doubly-linked-tree/proposer_boost.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
package doublylinkedtree

import (
"context"
"fmt"

fieldparams "github.com/prysmaticlabs/prysm/v4/config/fieldparams"
"github.com/prysmaticlabs/prysm/v4/config/params"
)

// resetBoostedProposerRoot sets the value of the proposer boosted root to zeros.
func (f *ForkChoice) resetBoostedProposerRoot(_ context.Context) error {
f.store.proposerBoostRoot = [32]byte{}
return nil
}

// applyProposerBoostScore applies the current proposer boost scores to the
// relevant nodes.
func (f *ForkChoice) applyProposerBoostScore() error {
Expand Down

0 comments on commit c80019b

Please sign in to comment.