[−][src]Struct ethereum_forkid::ForkFilter
Filter that describes the state of blockchain and can be used to check incoming ForkId
s for compatibility.
Methods
impl ForkFilter
[src]
pub fn new<F>(head: BlockNumber, genesis: H256, forks: F) -> Self where
F: IntoIterator<Item = BlockNumber>,
[src]
F: IntoIterator<Item = BlockNumber>,
Create the filter from provided head, genesis block hash, past forks and expected future forks.
pub fn set_head(&mut self, head: BlockNumber)
[src]
Set the current head
#[must_use]
pub const fn current(&self) -> ForkId
[src]
Return current fork id
pub fn is_compatible(&self, fork_id: ForkId) -> Result<(), RejectReason>
[src]
Check whether the provided ForkId
is compatible based on the validation rules in EIP-2124
.
Errors
Returns a RejectReason
if the ForkId
is not compatible.
Trait Implementations
impl Clone for ForkFilter
[src]
fn clone(&self) -> ForkFilter
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ForkFilter
[src]
impl MallocSizeOf for ForkFilter
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl PartialEq<ForkFilter> for ForkFilter
[src]
fn eq(&self, other: &ForkFilter) -> bool
[src]
fn ne(&self, other: &ForkFilter) -> bool
[src]
impl StructuralPartialEq for ForkFilter
[src]
Auto Trait Implementations
impl RefUnwindSafe for ForkFilter
impl Send for ForkFilter
impl Sync for ForkFilter
impl Unpin for ForkFilter
impl UnwindSafe for ForkFilter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf,
[src]
T: MallocSizeOf,
fn malloc_size_of(&self) -> usize
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,