mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 21:31:02 +00:00
committed by
GitHub
parent
14a4eed2aa
commit
b9854171c0
@@ -35,6 +35,7 @@ use sc_consensus::{BlockCheckParams, BlockImport, BlockImportParams, ImportResul
|
||||
use crate::{
|
||||
communication::notification::BeefyVersionedFinalityProofSender,
|
||||
justification::{decode_and_verify_finality_proof, BeefyVersionedFinalityProof},
|
||||
LOG_TARGET,
|
||||
};
|
||||
|
||||
/// A block-import handler for BEEFY.
|
||||
@@ -138,16 +139,20 @@ where
|
||||
(Some(encoded), ImportResult::Imported(_)) => {
|
||||
if let Ok(proof) = self.decode_and_verify(&encoded, number, hash) {
|
||||
// The proof is valid and the block is imported and final, we can import.
|
||||
debug!(target: "beefy", "🥩 import justif {:?} for block number {:?}.", proof, number);
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
"🥩 import justif {:?} for block number {:?}.", proof, number
|
||||
);
|
||||
// Send the justification to the BEEFY voter for processing.
|
||||
self.justification_sender
|
||||
.notify(|| Ok::<_, ()>(proof))
|
||||
.expect("forwards closure result; the closure always returns Ok; qed.");
|
||||
} else {
|
||||
debug!(
|
||||
target: "beefy",
|
||||
target: LOG_TARGET,
|
||||
"🥩 error decoding justification: {:?} for imported block {:?}",
|
||||
encoded, number,
|
||||
encoded,
|
||||
number,
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user