Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix wait_for_blocks counting blocks that didn't go through consensus (
Browse files Browse the repository at this point in the history
#6850)

* Initial commit

Forked at: 74804b5
Parent branch: origin/master

* WIP

Forked at: 74804b5
Parent branch: origin/master
  • Loading branch information
cecton authored Aug 7, 2020
1 parent 74804b5 commit 7b00235
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test-utils/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,11 @@ where

Box::pin(async move {
while let Some(notification) = import_notification_stream.next().await {
blocks.insert(notification.hash);
if blocks.len() == count {
break;
if notification.is_new_best {
blocks.insert(notification.hash);
if blocks.len() == count {
break;
}
}
}
})
Expand Down

0 comments on commit 7b00235

Please sign in to comment.