Fix process_deposits bug

This commit is contained in:
Pawan Dhananjay
2024-11-07 21:11:18 -08:00
parent 27ce1a08d9
commit da953b8155
3 changed files with 1 additions and 51 deletions

View File

@@ -377,7 +377,7 @@ pub fn process_deposits<E: EthSpec>(
if state.eth1_deposit_index() < eth1_deposit_index_limit {
let expected_deposit_len = std::cmp::min(
E::MaxDeposits::to_u64(),
state.get_outstanding_deposit_len()?,
eth1_deposit_index_limit.safe_sub(state.eth1_deposit_index())?,
);
block_verify!(
deposits.len() as u64 == expected_deposit_len,