[−][src]Struct ethereum_forkid::ForkFilter
Filter that describes the state of blockchain and can be used to check incoming ForkId
s for compatibility.
Implementations
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 validate(&self, fork_id: ForkId) -> Result<(), ValidationError>
[src]
Check whether the provided ForkId
is compatible based on the validation rules in EIP-2124
.
Errors
Returns a ValidationError
if the ForkId
is not compatible.
Trait Implementations
impl Clone for ForkFilter
[src]
pub fn clone(&self) -> ForkFilter
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ForkFilter
[src]
impl PartialEq<ForkFilter> for ForkFilter
[src]
pub fn eq(&self, other: &ForkFilter) -> bool
[src]
pub fn ne(&self, other: &ForkFilter) -> bool
[src]
impl StructuralPartialEq for ForkFilter
[src]
Auto Trait Implementations
impl RefUnwindSafe for ForkFilter
[src]
impl Send for ForkFilter
[src]
impl Sync for ForkFilter
[src]
impl Unpin for ForkFilter
[src]
impl UnwindSafe for ForkFilter
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,