Skip to content

Commit

Permalink
up-bump alpha6
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Dec 11, 2024
1 parent 43813d8 commit 235d7e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cl/beacon/handler/block_production.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,11 @@ func (a *ApiHandler) GetEthV3ValidatorBlock(
}

startConsensusProcessing := time.Now()

blockBuldingMachine := &eth2.Impl{}
blockBuldingMachine.BlockRewardsCollector = &eth2.BlockRewardsCollector{}
// do state transition
if err := machine.ProcessBlock(transition.DefaultMachine, baseState, block.ToGeneric()); err != nil {
if err := machine.ProcessBlock(blockBuldingMachine, baseState, block.ToGeneric()); err != nil {
log.Warn("Failed to process execution block", "err", err, "slot", targetSlot)
return nil, err
}
Expand All @@ -351,7 +354,7 @@ func (a *ApiHandler) GetEthV3ValidatorBlock(
)

// todo: consensusValue
rewardsCollector := &eth2.BlockRewardsCollector{}
rewardsCollector := blockBuldingMachine.BlockRewardsCollector
consensusValue := rewardsCollector.Attestations + rewardsCollector.ProposerSlashings + rewardsCollector.AttesterSlashings + rewardsCollector.SyncAggregate
a.setupHeaderReponseForBlockProduction(
w,
Expand Down

0 comments on commit 235d7e7

Please sign in to comment.