Skip to content

Commit

Permalink
fix: use Decodable directly (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Oct 18, 2024
1 parent bf35895 commit bdad5fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/consensus/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl Decodable for Header {
if buf.first().is_some_and(|b| *b == EMPTY_LIST_CODE) {
buf.advance(1)
} else {
this.base_fee_per_gas = Some(U256::decode(buf)?.to::<u64>());
this.base_fee_per_gas = Some(Decodable::decode(buf)?);
}
}

Expand All @@ -511,15 +511,15 @@ impl Decodable for Header {
if buf.first().is_some_and(|b| *b == EMPTY_LIST_CODE) {
buf.advance(1)
} else {
this.blob_gas_used = Some(U256::decode(buf)?.to::<u64>());
this.blob_gas_used = Some(Decodable::decode(buf)?);
}
}

if started_len - buf.len() < rlp_head.payload_length {
if buf.first().is_some_and(|b| *b == EMPTY_LIST_CODE) {
buf.advance(1)
} else {
this.excess_blob_gas = Some(U256::decode(buf)?.to::<u64>());
this.excess_blob_gas = Some(Decodable::decode(buf)?);
}
}

Expand Down

0 comments on commit bdad5fc

Please sign in to comment.