Skip to content
Snippets Groups Projects
Commit 6de54353 authored by Cecile Tonglet's avatar Cecile Tonglet Committed by GitHub
Browse files

Fix `wait_for_blocks` counting blocks that didn't go through consensus (#6850)

* Initial commit

Forked at: cde60b87
Parent branch: origin/master

* WIP

Forked at: cde60b87
Parent branch: origin/master
parent cde60b87
No related merge requests found
......@@ -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;
}
}
}
})
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment