pub struct PreparedBlockExPow {
pub block: Block,
pub block_blob: Vec<u8>,
pub hf_vote: HardFork,
pub hf_version: HardFork,
pub block_hash: [u8; 32],
pub height: usize,
pub miner_tx_weight: usize,
}Expand description
A pre-prepared block with all data needed to verify it, except the block’s proof of work.
Fields§
§block: BlockThe block.
block_blob: Vec<u8>The serialised block’s bytes.
hf_vote: HardForkThe block’s hard-fork vote.
hf_version: HardForkThe block’s hard-fork version.
block_hash: [u8; 32]The block’s hash.
height: usizeThe height of the block.
miner_tx_weight: usizeThe weight of the block’s miner transaction.
Implementations§
Source§impl PreparedBlockExPow
impl PreparedBlockExPow
Sourcepub fn new(block: Block) -> Result<Self, ConsensusError>
pub fn new(block: Block) -> Result<Self, ConsensusError>
Prepare a new block.
§Errors
This errors if either the block’s:
- Hard-fork values are invalid
- Miner transaction is missing a miner input
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreparedBlockExPow
impl RefUnwindSafe for PreparedBlockExPow
impl Send for PreparedBlockExPow
impl Sync for PreparedBlockExPow
impl Unpin for PreparedBlockExPow
impl UnsafeUnpin for PreparedBlockExPow
impl UnwindSafe for PreparedBlockExPow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 712 bytes