Function hotshot_testing::helpers::build_cert

source ·
pub async fn build_cert<TYPES: NodeType, V: Versions, DATAType: Committable + Clone + Eq + Hash + Serialize + Debug + 'static, VOTE: Vote<TYPES, Commitment = DATAType>, CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment>>(
    data: DATAType,
    membership: &Arc<RwLock<TYPES::Membership>>,
    view: TYPES::View,
    epoch: TYPES::Epoch,
    public_key: &TYPES::SignatureKey,
    private_key: &<TYPES::SignatureKey as SignatureKey>::PrivateKey,
    upgrade_lock: &UpgradeLock<TYPES, V>,
) -> CERT
Expand description

create certificate

§Panics

if we fail to sign the data