Struct chain_impl_mockchain::header::HeaderBftBuilder
source · pub struct HeaderBftBuilder<BftBuildingState: ?Sized>(Header, PhantomData<BftBuildingState>);
Expand description
Header Builder (finalize BFT part)
Tuple Fields§
§0: Header
§1: PhantomData<BftBuildingState>
Implementations§
source§impl HeaderBftBuilder<HeaderSetConsensusData>
impl HeaderBftBuilder<HeaderSetConsensusData>
pub fn sign_using(self, sk: &SecretKey<Ed25519>) -> HeaderBft
sourcefn sign_using_keys(
self,
sk: &SecretKey<Ed25519>,
pk: PublicKey<Ed25519>
) -> HeaderBft
fn sign_using_keys( self, sk: &SecretKey<Ed25519>, pk: PublicKey<Ed25519> ) -> HeaderBft
Method introduced for negative testing. It does not derive public key from secret, but allow not linked public keys
pub fn set_consensus_data( self, bft_leaderid: &BftLeaderId ) -> HeaderBftBuilder<HeaderSetConsensusSignature>
source§impl HeaderBftBuilder<HeaderSetConsensusSignature>
impl HeaderBftBuilder<HeaderSetConsensusSignature>
sourcepub fn get_authenticated_data(&self) -> &[u8] ⓘ
pub fn get_authenticated_data(&self) -> &[u8] ⓘ
Get the authenticated data of a BFT header being built
Typically this is used to generate the signature
sourcepub fn set_signature(self, bft_signature: BftSignature) -> HeaderBft
pub fn set_signature(self, bft_signature: BftSignature) -> HeaderBft
Set the signature in the BFT header and return the finalized BFT header
Auto Trait Implementations§
impl<BftBuildingState: ?Sized> RefUnwindSafe for HeaderBftBuilder<BftBuildingState>where BftBuildingState: RefUnwindSafe,
impl<BftBuildingState: ?Sized> Send for HeaderBftBuilder<BftBuildingState>where BftBuildingState: Send,
impl<BftBuildingState: ?Sized> Sync for HeaderBftBuilder<BftBuildingState>where BftBuildingState: Sync,
impl<BftBuildingState: ?Sized> Unpin for HeaderBftBuilder<BftBuildingState>where BftBuildingState: Unpin,
impl<BftBuildingState: ?Sized> UnwindSafe for HeaderBftBuilder<BftBuildingState>where BftBuildingState: UnwindSafe,
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