pub fn check_message_signature_with_buffer<H, N>(
    message: &grandpa::Message<H, N>,
    id: &AuthorityId,
    signature: &AuthoritySignature,
    round: RoundNumber,
    set_id: SetId,
    buf: &mut Vec<u8>,
) -> bool
where
    H: Encode,
    N: Encode,
{
    use sp_application_crypto::RuntimeAppPublic;
    localized_payload_with_buffer(round, set_id, message, buf);
    let valid = id.verify(&buf, signature);
    if !valid {
        {
            let lvl = ::log::Level::Debug;
            if lvl <= ::log::STATIC_MAX_LEVEL && lvl <= ::log::max_level() {
                :: log :: __private_api_log (:: core :: fmt :: Arguments :: new_v1 (& ["Bad signature on message from "] , & match (& id ,) { _args => [:: core :: fmt :: ArgumentV1 :: new (_args . 0 , :: core :: fmt :: Debug :: fmt)] , }) , lvl , & ("afg" , "sp_finality_grandpa" , "/Users/mmac/.cargo/git/checkouts/substrate-7e08433d4c370a21/4d28ebe/primitives/finality-grandpa/src/lib.rs" , 370u32)) ;
            }
        };
    }
    valid
}
/// Check a message signature by encoding the message as a localized payload and
/// verifying the provided signature using the expected authority id.
/// The encoding necessary to verify the signature will be done using the given
/// buffer, the original content of the buffer will be cleared.
Check a message signature by encoding the message as a localized payload and
verifying the provided signature using the expected authority id.
The encoding necessary to verify the signature will be done using the given
buffer, the original content of the buffer will be cleared.
Check a message signature by encoding the message as a localized payload and verifying the provided signature using the expected authority id . The encoding necessary to verify the signature will be done using the given buffer the original content of the buffer will be cleared .
pub fn check_message_signature_with_buffer<H, N>(
    message: &grandpa::Message<H, N>,
    id: &AuthorityId,
    signature: &AuthoritySignature,
    round: RoundNumber,
    set_id: SetId,
    buf: &mut Vec<u8>,
) -> bool
where
    H: Encode,
    N: Encode,
{
    use sp_application_crypto::RuntimeAppPublic;
    localized_payload_with_buffer(round, set_id, message, buf);
    let valid = id.verify(&buf, signature);
    if !valid {
        {
            let lvl = ::log::Level::Debug;
            if lvl <= ::log::STATIC_MAX_LEVEL && lvl <= ::log::max_level() {
                :: log :: __private_api_log (:: core :: fmt :: Arguments :: new_v1 (& ["Bad signature on message from "] , & match (& id ,) { _args => [:: core :: fmt :: ArgumentV1 :: new (_args . 0 , :: core :: fmt :: Debug :: fmt)] , }) , lvl , & ("afg" , "sp_finality_grandpa" , "/Users/mmac/.cargo/git/checkouts/substrate-7e08433d4c370a21/4d28ebe/primitives/finality-grandpa/src/lib.rs" , 370u32)) ;
            }
        };
    }
    valid
}
pub fn check_message_signature_with_buffer < H , N > ( message : & grandpa :: Message < H , N > , id : & AuthorityId , signature : & AuthoritySignature , round : RoundNumber , set_id : SetId , buf : & mut Vec < u8 > , ) -> bool where H : Encode , N : Encode , { use sp_application_crypto :: RuntimeAppPublic ; localized_payload_with_buffer ( round , set_id , message , buf ) ; let valid = id . verify ( & buf , signature ) ; if ! valid { { let lvl = :: log :: Level :: Debug ; if lvl <= :: log :: STATIC_MAX_LEVEL && lvl <= :: log :: max_level ( ) { :: log :: __private_api_log ( :: core :: fmt :: Arguments :: new_v1 ( & [ " " ] , & match ( & id , ) { _args => [ :: core :: fmt :: ArgumentV1 :: new ( _args . 0 , :: core :: fmt :: Debug :: fmt ) ] , } ) , lvl , & ( " " , " " , " " , 370u32 ) ) ; } } ; } valid }
Check a message signature by encoding the message as a localized payload and
verifying the provided signature using the expected authority id.
Check a message signature by encoding the message as a localized payload and verifying the provided signature using the expected authority id .
message
&grandpa::Message<H, N>
id
&AuthorityId
signature
&AuthoritySignature
round
RoundNumber
set_id
SetId
buf
&mut Vec<u8>
message
&grandpa::Message<H, N>
id
&AuthorityId
signature
&AuthoritySignature
round
RoundNumber
set_id
SetId
buf
&mut Vec<u8>