Add more detail to best node error

This commit is contained in:
Paul Hauner
2020-01-17 09:13:34 +11:00
parent 9d295b7e95
commit f136d38543
2 changed files with 8 additions and 6 deletions

View File

@@ -186,15 +186,15 @@ impl ProtoArray {
// the filter.
if !self.node_is_viable_for_head(&best_node) {
return Err(Error::InvalidBestNode {
start_root: *justified_root,
justified_epoch: self.justified_epoch,
finalized_epoch: self.finalized_epoch,
node_justified_epoch: justified_node.justified_epoch,
node_finalized_epoch: justified_node.finalized_epoch,
head_root: justified_node.root,
head_justified_epoch: justified_node.justified_epoch,
head_finalized_epoch: justified_node.finalized_epoch,
});
}
// dbg!(&self.nodes);
Ok(best_node.root)
}