pub fn new(
        block_hash: BlockHash,
        era_id: EraId,
        secret_key: &SecretKey,
        public_key: PublicKey,
    ) -> Self {
        let mut bytes = block_hash.inner().into_vec();
        bytes.extend_from_slice(&era_id.to_le_bytes());
        let signature = crypto::sign(bytes, secret_key, &public_key);
        FinalitySignature {
            block_hash,
            era_id,
            signature,
            public_key,
        }
    }
/// Create an instance of `FinalitySignature`.
Create an instance of `FinalitySignature`.
Create an instance of ` FinalitySignature ` .
pub fn new(
        block_hash: BlockHash,
        era_id: EraId,
        secret_key: &SecretKey,
        public_key: PublicKey,
    ) -> Self {
        let mut bytes = block_hash.inner().into_vec();
        bytes.extend_from_slice(&era_id.to_le_bytes());
        let signature = crypto::sign(bytes, secret_key, &public_key);
        FinalitySignature {
            block_hash,
            era_id,
            signature,
            public_key,
        }
    }
pub fn new ( block_hash : BlockHash , era_id : EraId , secret_key : & SecretKey , public_key : PublicKey , ) -> Self { let mut bytes = block_hash . inner ( ) . into_vec ( ) ; bytes . extend_from_slice ( & era_id . to_le_bytes ( ) ) ; let signature = crypto :: sign ( bytes , secret_key , & public_key ) ; FinalitySignature { block_hash , era_id , signature , public_key , } }
Create an instance of `FinalitySignature`.
Create an instance of ` FinalitySignature ` .
block_hash
BlockHash
era_id
EraId
secret_key
&SecretKey
public_key
PublicKey
block_hash
BlockHash
era_id
EraId
secret_key
&SecretKey
public_key
PublicKey