mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
replace &Bytes with &[u8] in optimism functions (#5896)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -170,7 +170,7 @@ pub trait RethL1BlockInfo {
|
||||
&self,
|
||||
chain_spec: &ChainSpec,
|
||||
timestamp: u64,
|
||||
input: &Bytes,
|
||||
input: &[u8],
|
||||
is_deposit: bool,
|
||||
) -> Result<U256, BlockExecutionError>;
|
||||
|
||||
@ -184,7 +184,7 @@ pub trait RethL1BlockInfo {
|
||||
&self,
|
||||
chain_spec: &ChainSpec,
|
||||
timestamp: u64,
|
||||
input: &Bytes,
|
||||
input: &[u8],
|
||||
) -> Result<U256, BlockExecutionError>;
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ impl RethL1BlockInfo for L1BlockInfo {
|
||||
&self,
|
||||
chain_spec: &ChainSpec,
|
||||
timestamp: u64,
|
||||
input: &Bytes,
|
||||
input: &[u8],
|
||||
is_deposit: bool,
|
||||
) -> Result<U256, BlockExecutionError> {
|
||||
if is_deposit {
|
||||
@ -218,7 +218,7 @@ impl RethL1BlockInfo for L1BlockInfo {
|
||||
&self,
|
||||
chain_spec: &ChainSpec,
|
||||
timestamp: u64,
|
||||
input: &Bytes,
|
||||
input: &[u8],
|
||||
) -> Result<U256, BlockExecutionError> {
|
||||
let spec_id = if chain_spec.is_fork_active_at_timestamp(Hardfork::Regolith, timestamp) {
|
||||
SpecId::REGOLITH
|
||||
|
||||
@ -1112,11 +1112,8 @@ where
|
||||
) -> EthResult<OptimismTxMeta> {
|
||||
let Some(l1_block_info) = l1_block_info else { return Ok(OptimismTxMeta::default()) };
|
||||
|
||||
let envelope_buf: Bytes = {
|
||||
let mut envelope_buf = bytes::BytesMut::new();
|
||||
tx.encode_enveloped(&mut envelope_buf);
|
||||
envelope_buf.freeze().into()
|
||||
};
|
||||
let mut envelope_buf = bytes::BytesMut::new();
|
||||
tx.encode_enveloped(&mut envelope_buf);
|
||||
|
||||
let (l1_fee, l1_data_gas) = if tx.is_deposit() {
|
||||
let inner_l1_fee = l1_block_info
|
||||
|
||||
@ -342,7 +342,7 @@ where
|
||||
info.l1_tx_data_fee(
|
||||
&self.chain_spec,
|
||||
block.timestamp,
|
||||
&encoded.freeze().into(),
|
||||
&encoded,
|
||||
transaction.is_deposit(),
|
||||
)
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user