fix compile

This commit is contained in:
realbigsean 2023-01-27 11:41:59 +01:00
parent dd512cd82a
commit 2c12200a1a
2 changed files with 3 additions and 7 deletions

View File

@ -44,7 +44,7 @@ impl<T: EthSpec> ExecutionLayer<T> {
KECCAK_EMPTY_LIST_RLP.as_fixed_bytes().into(), KECCAK_EMPTY_LIST_RLP.as_fixed_bytes().into(),
rlp_transactions_root, rlp_transactions_root,
rlp_withdrawals_root, rlp_withdrawals_root,
rlp_excess_data_gas, rlp_excess_data_gas.copied(),
); );
// Hash the RLP encoding of the block header. // Hash the RLP encoding of the block header.
@ -78,7 +78,7 @@ pub fn rlp_encode_withdrawal(withdrawal: &JsonWithdrawal) -> Vec<u8> {
pub fn rlp_encode_block_header(header: &ExecutionBlockHeader) -> Vec<u8> { pub fn rlp_encode_block_header(header: &ExecutionBlockHeader) -> Vec<u8> {
let mut rlp_header_stream = RlpStream::new(); let mut rlp_header_stream = RlpStream::new();
rlp_header_stream.begin_unbounded_list(); rlp_header_stream.begin_unbounded_list();
map_execution_block_header_fields_except_withdrawals_excess_data_gas!(&header, |_, field| { map_execution_block_header_fields_except_withdrawals!(&header, |_, field| {
rlp_header_stream.append(field); rlp_header_stream.append(field);
}); });
if let Some(withdrawals_root) = &header.withdrawals_root { if let Some(withdrawals_root) = &header.withdrawals_root {

View File

@ -25,11 +25,7 @@ use metastruct::metastruct;
/// Credit to Reth for the type definition. /// Credit to Reth for the type definition.
#[derive(Debug, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[metastruct(mappings( #[metastruct(mappings(
map_execution_block_header_fields_except_withdrawals(exclude(withdrawals_root)), map_execution_block_header_fields_except_withdrawals(exclude(withdrawals_root, excess_data_gas)),
map_execution_block_header_fields_except_withdrawals_excess_data_gas(exclude(
withdrawals_root,
excess_data_gas
))
))] ))]
pub struct ExecutionBlockHeader { pub struct ExecutionBlockHeader {
pub parent_hash: Hash256, pub parent_hash: Hash256,