more logging around pending GRANDPA changes (#1587)

This commit is contained in:
Robert Habermeier
2019-01-27 10:53:57 -03:00
committed by Gav Wood
parent f16ddcb622
commit 86c5f78805
3 changed files with 28 additions and 0 deletions
@@ -140,8 +140,13 @@ where
))
.unwrap_or_else(|i| i);
debug!(target: "afg", "Inserting potential set change at block {:?}.",
(&pending.canon_height, &pending.canon_hash));
self.pending_changes.insert(idx, pending);
debug!(target: "afg", "There are now {} pending changes.", self.pending_changes.len());
Ok(())
}
@@ -1136,6 +1136,7 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA> BlockImport<Block>
let is_equal_or_descendent_of = |base: &Block::Hash| -> Result<(), ConsensusError> {
let error = || {
debug!(target: "afg", "rejecting change: {} is in the same chain as {}", hash, base);
Err(ConsensusErrorKind::ClientImport("Incorrect base hash".to_string()).into())
};