more approval voting instrumentation (#2663)

* more approval voting instrumentation

* fix `unapproved_candidates`

* Update node/core/approval-voting/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Robert Habermeier
2021-03-23 11:10:54 +01:00
committed by GitHub
parent bbc3ad3cfc
commit a80b2bbf13
3 changed files with 38 additions and 6 deletions
@@ -1523,7 +1523,8 @@ fn approved_ancestor_all_approved() {
let test_fut = Box::pin(async move {
assert_eq!(
handle_approved_ancestor(&mut ctx, &state.db, block_hash_4, 0).await.unwrap(),
handle_approved_ancestor(&mut ctx, &state.db, block_hash_4, 0, &Default::default())
.await.unwrap(),
Some((block_hash_4, 4)),
)
});
@@ -1605,7 +1606,8 @@ fn approved_ancestor_missing_approval() {
let test_fut = Box::pin(async move {
assert_eq!(
handle_approved_ancestor(&mut ctx, &state.db, block_hash_4, 0).await.unwrap(),
handle_approved_ancestor(&mut ctx, &state.db, block_hash_4, 0, &Default::default())
.await.unwrap(),
Some((block_hash_2, 2)),
)
});