Remove unused code in the Ethereum processor

This commit is contained in:
Luke Parker 2024-09-19 02:46:32 -04:00
parent 855e53164e
commit 1a08d50e16
4 changed files with 6 additions and 15 deletions

View file

@ -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

View file

@ -102,9 +102,9 @@ impl SignMachine<Transaction> 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!()
}

View file

@ -131,7 +131,7 @@ impl<D: Db> ScannerFeed for Rpc<D> {
let end_hash = end_header.hash.into();
Ok(Epoch { prior_end_hash, start, end_hash })
Ok(Epoch { prior_end_hash, end_hash })
}
}

View file

@ -40,7 +40,7 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
fn rotate(
&self,
nonce: u64,
retiring_key: KeyFor<Rpc<D>>,
_retiring_key: KeyFor<Rpc<D>>,
new_key: KeyFor<Rpc<D>>,
) -> (Self::SignableTransaction, EventualityFor<Rpc<D>>) {
let action = Action::SetKey {
@ -54,7 +54,7 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
fn fulfill(
&self,
nonce: u64,
key: KeyFor<Rpc<D>>,
_key: KeyFor<Rpc<D>>,
payments: Vec<Payment<AddressFor<Rpc<D>>>>,
) -> Vec<(Self::SignableTransaction, EventualityFor<Rpc<D>>)> {
let mut outs = Vec::with_capacity(payments.len());