Skip to content

Commit c276fe6

Browse files
committed
format and lint fixes
1 parent 8b4c037 commit c276fe6

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

consensus/state_processing/src/envelope_processing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub fn envelope_processing<E: EthSpec>(
227227
let payment_index = E::slots_per_epoch()
228228
.safe_add(state.slot().as_u64().safe_rem(E::slots_per_epoch())?)?
229229
as usize;
230-
let mut payment = state
230+
let payment = state
231231
.builder_pending_payments()?
232232
.get(payment_index)
233233
.ok_or(EnvelopeProcessingError::BuilderPaymentIndexOutOfBounds(
@@ -236,7 +236,7 @@ pub fn envelope_processing<E: EthSpec>(
236236
.clone();
237237
let amount = payment.withdrawal.amount;
238238
if amount > 0 {
239-
let exit_queue_epoch = state.compute_exit_epoch_and_update_churn(amount, spec)?;
239+
let _exit_queue_epoch = state.compute_exit_epoch_and_update_churn(amount, spec)?;
240240
state
241241
.builder_pending_withdrawals_mut()?
242242
.push(payment.withdrawal)

consensus/state_processing/src/per_block_processing.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,9 +714,7 @@ pub fn get_builders_sweep_withdrawals<E: EthSpec>(
714714
withdrawal_index.safe_add_assign(1)?;
715715
}
716716

717-
builder_index = builder_index
718-
.safe_add(1)?
719-
.safe_rem(builders.len() as u64)?;
717+
builder_index = builder_index.safe_add(1)?.safe_rem(builders.len() as u64)?;
720718
processed_count.safe_add_assign(1)?;
721719
}
722720

@@ -801,7 +799,16 @@ pub fn get_validators_sweep_withdrawals<E: EthSpec>(
801799
pub fn get_expected_withdrawals<E: EthSpec>(
802800
state: &BeaconState<E>,
803801
spec: &ChainSpec,
804-
) -> Result<(Withdrawals<E>, Option<usize>, Option<usize>, Option<u64>, u64), BlockProcessingError> {
802+
) -> Result<
803+
(
804+
Withdrawals<E>,
805+
Option<usize>,
806+
Option<usize>,
807+
Option<u64>,
808+
u64,
809+
),
810+
BlockProcessingError,
811+
> {
805812
let mut withdrawal_index = state.next_withdrawal_index()?;
806813
let mut withdrawals = Vec::<Withdrawal>::with_capacity(E::max_withdrawals_per_payload());
807814

consensus/state_processing/src/per_epoch_processing/single_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,10 @@ fn process_builder_pending_payments<E: EthSpec>(
551551
.try_for_each(|payment| -> Result<(), Error> {
552552
let exit_queue_epoch =
553553
state.compute_exit_epoch_and_update_churn(payment.withdrawal.amount, spec)?;
554-
let withdrawable_epoch =
554+
let _withdrawable_epoch =
555555
exit_queue_epoch.safe_add(spec.min_validator_withdrawability_delay)?;
556556

557-
let mut withdrawal = payment.withdrawal.clone();
557+
let withdrawal = payment.withdrawal.clone();
558558
state.builder_pending_withdrawals_mut()?.push(withdrawal)?;
559559
Ok(())
560560
})?;

0 commit comments

Comments
 (0)