mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: Add reth rustfmt
This commit is contained in:
@ -2,7 +2,8 @@ use revm::{
|
||||
context::{ContextSetters, Evm as EvmCtx},
|
||||
context_interface::ContextTr,
|
||||
handler::{
|
||||
instructions::{EthInstructions, InstructionProvider}, EthPrecompiles, EvmTr, PrecompileProvider
|
||||
instructions::{EthInstructions, InstructionProvider},
|
||||
EthPrecompiles, EvmTr, PrecompileProvider,
|
||||
},
|
||||
inspector::{InspectorEvmTr, JournalExt},
|
||||
interpreter::{interpreter::EthInterpreter, Interpreter, InterpreterAction, InterpreterTypes},
|
||||
|
||||
@ -18,9 +18,7 @@ pub struct HlHandler<EVM, ERROR, FRAME> {
|
||||
|
||||
impl<EVM, ERROR, FRAME> HlHandler<EVM, ERROR, FRAME> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
mainnet: MainnetHandler::default(),
|
||||
}
|
||||
Self { mainnet: MainnetHandler::default() }
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,14 +85,12 @@ where
|
||||
logs,
|
||||
output,
|
||||
},
|
||||
SuccessOrHalt::Revert => ExecutionResult::Revert {
|
||||
gas_used: final_gas_used,
|
||||
output: output.into_data(),
|
||||
},
|
||||
SuccessOrHalt::Halt(reason) => ExecutionResult::Halt {
|
||||
reason,
|
||||
gas_used: final_gas_used,
|
||||
},
|
||||
SuccessOrHalt::Revert => {
|
||||
ExecutionResult::Revert { gas_used: final_gas_used, output: output.into_data() }
|
||||
}
|
||||
SuccessOrHalt::Halt(reason) => {
|
||||
ExecutionResult::Halt { reason, gas_used: final_gas_used }
|
||||
}
|
||||
// Only two internal return flags.
|
||||
flag @ (SuccessOrHalt::FatalExternalError | SuccessOrHalt::Internal(_)) => {
|
||||
panic!(
|
||||
|
||||
@ -27,9 +27,7 @@ impl<T: Transaction> HlTxEnv<T> {
|
||||
|
||||
impl Default for HlTxEnv<TxEnv> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
base: TxEnv::default(),
|
||||
}
|
||||
Self { base: TxEnv::default() }
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,10 +131,7 @@ impl FromRecoveredTx<TransactionSigned> for HlTxEnv<TxEnv> {
|
||||
fn from_recovered_tx(tx: &TransactionSigned, sender: Address) -> Self {
|
||||
if let Some(gas_price) = tx.gas_price() {
|
||||
if gas_price == 0 {
|
||||
return Self::new(TxEnv::from_recovered_tx(
|
||||
tx,
|
||||
s_to_address(tx.signature().s()),
|
||||
));
|
||||
return Self::new(TxEnv::from_recovered_tx(tx, s_to_address(tx.signature().s())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user