Skip to main content

Validation

Trait Validation 

Source
pub trait Validation:
    Validation
    + Sync
    + Send
    + Sized
    + Unpin {
    const IS_CHECKED: bool;
}
Expand description

Marker for whether or not a block has been validated.

We define valid as:

  • The Merkle root of the header matches Merkle root of the transaction list.
  • The witness commitment in coinbase matches the transaction list.

See bitcoin::block::BlockUncheckedExt::validate().

Required Associated Constants§

Source

const IS_CHECKED: bool

Indicates whether this Validation is Checked or not.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Validation for Checked

Available on crate feature alloc only.
Source§

const IS_CHECKED: bool = true

Source§

impl Validation for Unchecked

Available on crate feature alloc only.
Source§

const IS_CHECKED: bool = false