mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Remove unused code in the Ethereum processor
This commit is contained in:
@@ -16,19 +16,10 @@ use crate::{output::Output, transaction::Eventuality};
|
|||||||
pub(crate) struct Epoch {
|
pub(crate) struct Epoch {
|
||||||
// The hash of the block which ended the prior Epoch.
|
// The hash of the block which ended the prior Epoch.
|
||||||
pub(crate) prior_end_hash: [u8; 32],
|
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.
|
// The hash of the last block within this Epoch.
|
||||||
pub(crate) end_hash: [u8; 32],
|
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 {
|
impl primitives::BlockHeader for Epoch {
|
||||||
fn id(&self) -> [u8; 32] {
|
fn id(&self) -> [u8; 32] {
|
||||||
self.end_hash
|
self.end_hash
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ impl SignMachine<Transaction> for ActionSignMachine {
|
|||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
fn from_cache(
|
fn from_cache(
|
||||||
params: Self::Params,
|
_params: Self::Params,
|
||||||
keys: Self::Keys,
|
_keys: Self::Keys,
|
||||||
cache: CachedPreprocess,
|
_cache: CachedPreprocess,
|
||||||
) -> (Self, Self::Preprocess) {
|
) -> (Self, Self::Preprocess) {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ impl<D: Db> ScannerFeed for Rpc<D> {
|
|||||||
|
|
||||||
let end_hash = end_header.hash.into();
|
let end_hash = end_header.hash.into();
|
||||||
|
|
||||||
Ok(Epoch { prior_end_hash, start, end_hash })
|
Ok(Epoch { prior_end_hash, end_hash })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
|
|||||||
fn rotate(
|
fn rotate(
|
||||||
&self,
|
&self,
|
||||||
nonce: u64,
|
nonce: u64,
|
||||||
retiring_key: KeyFor<Rpc<D>>,
|
_retiring_key: KeyFor<Rpc<D>>,
|
||||||
new_key: KeyFor<Rpc<D>>,
|
new_key: KeyFor<Rpc<D>>,
|
||||||
) -> (Self::SignableTransaction, EventualityFor<Rpc<D>>) {
|
) -> (Self::SignableTransaction, EventualityFor<Rpc<D>>) {
|
||||||
let action = Action::SetKey {
|
let action = Action::SetKey {
|
||||||
@@ -54,7 +54,7 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
|
|||||||
fn fulfill(
|
fn fulfill(
|
||||||
&self,
|
&self,
|
||||||
nonce: u64,
|
nonce: u64,
|
||||||
key: KeyFor<Rpc<D>>,
|
_key: KeyFor<Rpc<D>>,
|
||||||
payments: Vec<Payment<AddressFor<Rpc<D>>>>,
|
payments: Vec<Payment<AddressFor<Rpc<D>>>>,
|
||||||
) -> Vec<(Self::SignableTransaction, EventualityFor<Rpc<D>>)> {
|
) -> Vec<(Self::SignableTransaction, EventualityFor<Rpc<D>>)> {
|
||||||
let mut outs = Vec::with_capacity(payments.len());
|
let mut outs = Vec::with_capacity(payments.len());
|
||||||
|
|||||||
Reference in New Issue
Block a user