Struct mainnet_lib::BlockBuilder
source · pub struct BlockBuilder;
Expand description
Block builder responsible for building blocks
Implementations§
source§impl BlockBuilder
impl BlockBuilder
sourcepub fn next_block(prev: Option<&Block>, transactions: &[Transaction]) -> Block
pub fn next_block(prev: Option<&Block>, transactions: &[Transaction]) -> Block
fn random_kes_signature() -> KESSignature
fn generate_random_bytes_of_len(len: usize) -> Vec<u8> ⓘ
sourcepub fn block_header(
block_number: u32,
prev_hash: Option<BlockHash>
) -> HeaderBody
pub fn block_header( block_number: u32, prev_hash: Option<BlockHash> ) -> HeaderBody
Builds new block header based on block number and previous block hash
Panics
On random bytes generation issue
Auto Trait Implementations§
impl RefUnwindSafe for BlockBuilder
impl Send for BlockBuilder
impl Sync for BlockBuilder
impl Unpin for BlockBuilder
impl UnwindSafe for BlockBuilder
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request