approval votes checking logs (#3233)

* approval-voting: logs for invalid votes

* proper errors for assignment checks

* proper errors for approval checks
This commit is contained in:
Andronik Ordian
2021-06-13 17:34:05 +02:00
committed by GitHub
parent 4797fb7dfb
commit 93e42fb213
6 changed files with 149 additions and 50 deletions
@@ -17,6 +17,7 @@
use std::time::Duration;
use futures::{future, Future, executor};
use assert_matches::assert_matches;
use polkadot_node_subsystem::messages::ApprovalCheckError;
use polkadot_node_subsystem_test_helpers as test_helpers;
use polkadot_node_subsystem_util::TimeoutExt as _;
use polkadot_node_network_protocol::{view, ObservedRole};
@@ -594,7 +595,7 @@ fn import_approval_bad() {
tx,
)) => {
assert_eq!(vote, approval);
tx.send(ApprovalCheckResult::Bad).unwrap();
tx.send(ApprovalCheckResult::Bad(ApprovalCheckError::UnknownBlock(hash))).unwrap();
}
);