mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 04:14:33 +00:00
builder payments w/ slashed validators fix
This commit is contained in:
@@ -799,6 +799,7 @@ pub fn process_execution_payload_bid<E: EthSpec, Payload: AbstractExecPayload<E>
|
||||
amount,
|
||||
builder_index,
|
||||
},
|
||||
proposer_index: block.proposer_index(),
|
||||
};
|
||||
|
||||
let payment_index = E::SlotsPerEpoch::to_usize()
|
||||
|
||||
@@ -418,7 +418,12 @@ pub fn process_proposer_slashings<E: EthSpec>(
|
||||
.builder_pending_payments_mut()?
|
||||
.get_mut(index)
|
||||
.ok_or(BlockProcessingError::BuilderPaymentIndexOutOfBounds(index))?;
|
||||
*payment = BuilderPendingPayment::default();
|
||||
|
||||
if payment.proposer_index
|
||||
== proposer_slashing.signed_header_1.message.proposer_index
|
||||
{
|
||||
*payment = BuilderPendingPayment::default();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ pub struct BuilderPendingPayment {
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub weight: u64,
|
||||
pub withdrawal: BuilderPendingWithdrawal,
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub proposer_index: u64,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user