Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/evm/src/block/state_hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ pub enum StateChangePostBlockSource {
WithdrawalRequestsContract,
/// EIP-7251 consolidation requests contract
ConsolidationRequestsContract,
/// Staking distribution from block rewards and withdrawals
StakingDistribution,
}

impl<F> OnStateHook for F
Expand Down
8 changes: 7 additions & 1 deletion crates/evm/src/eth/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,16 @@ where
Bytes::from(data),
) {
Ok(res) => {
self.system_caller.on_state(
StateChangeSource::PostBlock(
StateChangePostBlockSource::StakingDistribution,
),
&res.state,
);
self.evm.db_mut().commit(res.state);
},
Err(e) => {
print!("execution failed: {e}");
print!("failed to apply staking distribution: {e}");
}
};

Expand Down
Loading