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

test-utils: Fix wait_for_blocks in presence of reorgs #14215

Merged

Conversation

alexggh
Copy link
Contributor

@alexggh alexggh commented May 24, 2023

In the cases where a reorg happens we might receive notifications for different blocks at the same level, so instead of the chain having count new blocks it has less and that will break the tests which use this function.

So, use the block number to identify that count blocks have been built in the chain.

Examples where this issue was hit:
paritytech/polkadot#7267

In the cases where a reorg happens we might receive notifications
for different blocks at the same level, so instead of the chain having
count new blocks it has less and that will break the tests which use this
function.

So, use the block number to identify that `count` blocks have been built in the
chain.

Examples where this issue was hit:
  paritytech/polkadot#7267

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
@alexggh alexggh added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels May 25, 2023
@alexggh alexggh requested a review from sandreim May 25, 2023 08:13
@alexggh alexggh marked this pull request as ready for review May 25, 2023 08:14
@ordian
Copy link
Member

ordian commented May 26, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 8b1af50 into paritytech:master May 26, 2023
Ank4n pushed a commit that referenced this pull request Jul 8, 2023
In the cases where a reorg happens we might receive notifications
for different blocks at the same level, so instead of the chain having
count new blocks it has less and that will break the tests which use this
function.

So, use the block number to identify that `count` blocks have been built in the
chain.

Examples where this issue was hit:
  paritytech/polkadot#7267

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
In the cases where a reorg happens we might receive notifications
for different blocks at the same level, so instead of the chain having
count new blocks it has less and that will break the tests which use this
function.

So, use the block number to identify that `count` blocks have been built in the
chain.

Examples where this issue was hit:
  paritytech/polkadot#7267

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants