Rename PendingPartialWithdraw index field to validator_index

This commit is contained in:
Eitan Seri-Levi
2025-01-02 09:42:12 +07:00
parent 52e602dca8
commit 293db28ca1
4 changed files with 11 additions and 11 deletions

View File

@@ -2193,7 +2193,7 @@ impl<E: EthSpec> BeaconState<E> {
for withdrawal in self
.pending_partial_withdrawals()?
.iter()
.filter(|withdrawal| withdrawal.index as usize == validator_index)
.filter(|withdrawal| withdrawal.validator_index as usize == validator_index)
{
pending_balance.safe_add_assign(withdrawal.amount)?;
}

View File

@@ -21,7 +21,7 @@ use tree_hash_derive::TreeHash;
)]
pub struct PendingPartialWithdrawal {
#[serde(with = "serde_utils::quoted_u64")]
pub index: u64,
pub validator_index: u64,
#[serde(with = "serde_utils::quoted_u64")]
pub amount: u64,
pub withdrawable_epoch: Epoch,