pub struct ValidationContext {
pub fork: ForkSpec,
pub block_number: BlockNumber,
pub timestamp: UnixTimestamp,
}Expand description
Validation context that must be explicit for consensus-sensitive operations.
Fields§
§fork: ForkSpecFork rules.
block_number: BlockNumberCurrent block number.
timestamp: UnixTimestampCurrent block timestamp.
Implementations§
Source§impl ValidationContext
impl ValidationContext
Sourcepub fn fork_is_active(self) -> bool
pub fn fork_is_active(self) -> bool
Returns whether the configured fork is active for this context.
Trait Implementations§
Source§impl Clone for ValidationContext
impl Clone for ValidationContext
Source§fn clone(&self) -> ValidationContext
fn clone(&self) -> ValidationContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ValidationContext
Source§impl Debug for ValidationContext
impl Debug for ValidationContext
impl Eq for ValidationContext
Source§impl PartialEq for ValidationContext
impl PartialEq for ValidationContext
Source§fn eq(&self, other: &ValidationContext) -> bool
fn eq(&self, other: &ValidationContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidationContext
Auto Trait Implementations§
impl Freeze for ValidationContext
impl RefUnwindSafe for ValidationContext
impl Send for ValidationContext
impl Sync for ValidationContext
impl Unpin for ValidationContext
impl UnsafeUnpin for ValidationContext
impl UnwindSafe for ValidationContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more