diff --git a/core/network/src/sync.rs b/core/network/src/sync.rs index 38e9e2dfaa110..ace15e3e25bc6 100644 --- a/core/network/src/sync.rs +++ b/core/network/src/sync.rs @@ -144,13 +144,6 @@ impl PendingJustifications { self.pending_requests.push_back(request); } - println!("debug dispatch"); - println!("peer_requests: {:?}", self.peer_requests); - println!("pending_requests: {:?}", self.pending_requests); - println!("peers: {:?}", peers); - println!("justifications: {:?}", self.justifications.roots().collect::>()); - println!("debug dispatch end"); - if self.pending_requests.is_empty() { return; } @@ -261,6 +254,8 @@ impl PendingJustifications { is_descendent_of: F, force: bool, ) where F: Fn(&B::Hash, &B::Hash) -> Result { + trace!("queue_request: hash: {} number:{} justifications_finalized: {:?}", justification.0.clone(), justification.1.clone(), self.justifications.best_finalized_number); + match self.justifications.import(justification.0.clone(), justification.1.clone(), (), &is_descendent_of) { Ok(true) => { // this is a new root so we add it to the current `pending_requests` diff --git a/core/util/fork-tree/src/lib.rs b/core/util/fork-tree/src/lib.rs index f194ac8915159..972c70adce4a5 100644 --- a/core/util/fork-tree/src/lib.rs +++ b/core/util/fork-tree/src/lib.rs @@ -82,7 +82,7 @@ pub enum FinalizationResult { #[derive(Clone, Debug, Decode, Encode, PartialEq)] pub struct ForkTree { roots: Vec>, - best_finalized_number: Option, + pub best_finalized_number: Option, } impl ForkTree where