mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 05:52:45 +00:00
Post-rebase adjustments.
This commit is contained in:
parent
3a9b4f065a
commit
da45307422
@ -124,21 +124,29 @@ proc collectFromAttestations(
|
|||||||
) =
|
) =
|
||||||
withStateAndMaybeBlindedBlck(forkedState, forkedBlock):
|
withStateAndMaybeBlindedBlck(forkedState, forkedBlock):
|
||||||
when consensusFork > ConsensusFork.Phase0:
|
when consensusFork > ConsensusFork.Phase0:
|
||||||
let base_reward_per_increment = get_base_reward_per_increment(
|
let
|
||||||
|
base_reward_per_increment =
|
||||||
|
get_base_reward_per_increment(
|
||||||
get_total_active_balance(forkyState.data, cache))
|
get_total_active_balance(forkyState.data, cache))
|
||||||
|
blockRoot = hash_tree_root(forkyBlck)
|
||||||
|
|
||||||
doAssert base_reward_per_increment > 0
|
doAssert base_reward_per_increment > 0
|
||||||
|
|
||||||
for attestation in forkyBlck.body.attestations:
|
for attestation in forkyBlck.body.attestations:
|
||||||
doAssert check_attestation(
|
doAssert check_attestation(
|
||||||
forkyState.data, attestation, {}, cache).isOk
|
forkyState.data, attestation, {}, cache).isOk
|
||||||
let proposerReward =
|
let proposerReward =
|
||||||
if attestation.data.target.epoch == get_current_epoch(forkyState.data):
|
if attestation.data.target.epoch ==
|
||||||
|
get_current_epoch(forkyState.data):
|
||||||
get_proposer_reward(forkyState.data, attestation,
|
get_proposer_reward(forkyState.data, attestation,
|
||||||
base_reward_per_increment, cache,
|
base_reward_per_increment, cache,
|
||||||
auxiliaryState.currentEpochParticipation)
|
auxiliaryState.currentEpochParticipation,
|
||||||
|
true, blockRoot)
|
||||||
else:
|
else:
|
||||||
get_proposer_reward(
|
get_proposer_reward(
|
||||||
forkyState.data, attestation, base_reward_per_increment, cache,
|
forkyState.data, attestation, base_reward_per_increment, cache,
|
||||||
auxiliaryState.previousEpochParticipation)
|
auxiliaryState.previousEpochParticipation,
|
||||||
|
true, blockRoot)
|
||||||
proposerOutcome += proposerReward
|
proposerOutcome += proposerReward
|
||||||
|
|
||||||
proc collectFromSyncAggregate(
|
proc collectFromSyncAggregate(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user