Remove withdrawals guard for PayloadAttributesV2

This commit is contained in:
Mark Mackey
2022-11-28 11:43:54 -06:00
parent 342489a0c3
commit e0ea26c228
5 changed files with 9 additions and 7 deletions

View File

@@ -375,8 +375,9 @@ pub struct JsonPayloadAttributes {
pub timestamp: u64,
pub prev_randao: Hash256,
pub suggested_fee_recipient: Address,
#[cfg(feature = "withdrawals")]
#[superstruct(only(V2))]
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(default)]
pub withdrawals: Option<Vec<JsonWithdrawal>>,
}
@@ -392,7 +393,6 @@ impl From<PayloadAttributes> for JsonPayloadAttributes {
timestamp: pa.timestamp,
prev_randao: pa.prev_randao,
suggested_fee_recipient: pa.suggested_fee_recipient,
#[cfg(feature = "withdrawals")]
withdrawals: pa
.withdrawals
.map(|w| w.into_iter().map(Into::into).collect()),
@@ -413,7 +413,6 @@ impl From<JsonPayloadAttributes> for PayloadAttributes {
timestamp: jpa.timestamp,
prev_randao: jpa.prev_randao,
suggested_fee_recipient: jpa.suggested_fee_recipient,
#[cfg(feature = "withdrawals")]
withdrawals: jpa
.withdrawals
.map(|jw| jw.into_iter().map(Into::into).collect()),