mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Fix phase0 block reward in rewards API (#5101)
* Added Block Rewards * added new type * added enum * Fix phase0 block reward in rewards API (#4929) * Merge 'guav00a/proposer-rewards-api' * Merge unstable * Revamp phase0 reward API tests - Add test_rewards_base_slashings (testing #5101) - Improve fix to not include proposer reward in attestation reward API calculation (#4856) - Adjust test approach for phase0 tests: Pad with empty epochs to include all rewards in calculation - Simplify and unify code across all reward tests * Merge branch 'unstable' into fix-4929 * Merge branch 'unstable' into fix-4929 * Merge remote-tracking branch 'origin/unstable' into fix-4929 * Fix merge fallout * Remove junk revived in merge * Address review - check for attestations with lower inclusion delay - check for double attestations in block - add test * Merge branch 'unstable' into fix-4929 * Merge branch 'unstable' into fix-4929
This commit is contained in:
@@ -15,12 +15,10 @@ pub fn compute_beacon_block_rewards<T: BeaconChainTypes>(
|
||||
|
||||
let block_ref = block.message();
|
||||
|
||||
let block_root = block.canonical_root();
|
||||
|
||||
let mut state = get_state_before_applying_block(chain.clone(), &block)?;
|
||||
|
||||
let rewards = chain
|
||||
.compute_beacon_block_reward(block_ref, block_root, &mut state)
|
||||
.compute_beacon_block_reward(block_ref, &mut state)
|
||||
.map_err(beacon_chain_error)?;
|
||||
|
||||
Ok((rewards, execution_optimistic, finalized))
|
||||
|
||||
Reference in New Issue
Block a user