From 1a08d50e16591d89ab553624cb12c9d79afb99a8 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 19 Sep 2024 02:46:32 -0400 Subject: [PATCH] Remove unused code in the Ethereum processor --- processor/ethereum/src/primitives/block.rs | 9 --------- processor/ethereum/src/primitives/machine.rs | 6 +++--- processor/ethereum/src/rpc.rs | 2 +- processor/ethereum/src/scheduler.rs | 4 ++-- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/processor/ethereum/src/primitives/block.rs b/processor/ethereum/src/primitives/block.rs index d5f0cb99..723e099d 100644 --- a/processor/ethereum/src/primitives/block.rs +++ b/processor/ethereum/src/primitives/block.rs @@ -16,19 +16,10 @@ use crate::{output::Output, transaction::Eventuality}; pub(crate) struct Epoch { // The hash of the block which ended the prior Epoch. pub(crate) prior_end_hash: [u8; 32], - // The first block number within this Epoch. - pub(crate) start: u64, // The hash of the last block within this Epoch. pub(crate) end_hash: [u8; 32], } -impl Epoch { - // The block number of the last block within this epoch. - fn end(&self) -> u64 { - self.start + 31 - } -} - impl primitives::BlockHeader for Epoch { fn id(&self) -> [u8; 32] { self.end_hash diff --git a/processor/ethereum/src/primitives/machine.rs b/processor/ethereum/src/primitives/machine.rs index f37fb440..1762eb28 100644 --- a/processor/ethereum/src/primitives/machine.rs +++ b/processor/ethereum/src/primitives/machine.rs @@ -102,9 +102,9 @@ impl SignMachine for ActionSignMachine { unimplemented!() } fn from_cache( - params: Self::Params, - keys: Self::Keys, - cache: CachedPreprocess, + _params: Self::Params, + _keys: Self::Keys, + _cache: CachedPreprocess, ) -> (Self, Self::Preprocess) { unimplemented!() } diff --git a/processor/ethereum/src/rpc.rs b/processor/ethereum/src/rpc.rs index a53e6b33..0769c5c3 100644 --- a/processor/ethereum/src/rpc.rs +++ b/processor/ethereum/src/rpc.rs @@ -131,7 +131,7 @@ impl ScannerFeed for Rpc { let end_hash = end_header.hash.into(); - Ok(Epoch { prior_end_hash, start, end_hash }) + Ok(Epoch { prior_end_hash, end_hash }) } } diff --git a/processor/ethereum/src/scheduler.rs b/processor/ethereum/src/scheduler.rs index 39f3fed3..55e091fc 100644 --- a/processor/ethereum/src/scheduler.rs +++ b/processor/ethereum/src/scheduler.rs @@ -40,7 +40,7 @@ impl smart_contract_scheduler::SmartContract> for SmartContract { fn rotate( &self, nonce: u64, - retiring_key: KeyFor>, + _retiring_key: KeyFor>, new_key: KeyFor>, ) -> (Self::SignableTransaction, EventualityFor>) { let action = Action::SetKey { @@ -54,7 +54,7 @@ impl smart_contract_scheduler::SmartContract> for SmartContract { fn fulfill( &self, nonce: u64, - key: KeyFor>, + _key: KeyFor>, payments: Vec>>>, ) -> Vec<(Self::SignableTransaction, EventualityFor>)> { let mut outs = Vec::with_capacity(payments.len());