Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10478 from EOSIO/prune-test-fix
Browse files Browse the repository at this point in the history
flakiness fix for eosio_blocklog_prune_test
  • Loading branch information
dimas1185 authored Jul 6, 2021
2 parents 8e4a6a0 + 4866644 commit 4e6f5c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/eosio_blocklog_prune_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@

assert headAdvanced or lvnPostInfo["head_block_num"] >= cfTrxBlockNum, "the light validation node stops syncing"

#lib will be cfTrxBlockNum-2 and head cfTrxBlockNum-1 because of when we will receive incomplete block we won't advance lib
fullValidationNode.waitForBlock(cfTrxBlockNum-2, blockType=BlockType.lib, timeout=WaitSpec.calculate(leeway=timeForNodesToWorkOutReconnect), errorContext="fullValidationNode LIB did not advance")
# Maximum lib will be cfTrxBlockNum-2 and head cfTrxBlockNum-1 because of when we will receive incomplete block we won't advance lib
# However lib & head could be less in case net plugin receives unlinkable block before it processed previous blocks
# This check ensures LIB doesn't go beyond cfTrxBlockNum-1
assert False == fullValidationNode.waitForBlock(cfTrxBlockNum-1, blockType=BlockType.lib, timeout=WaitSpec.calculate(leeway=timeForNodesToWorkOutReconnect))
Utils.Print("Ensure full validation node stops syncing")
headAdvanced = fullValidationNode.waitForHeadToAdvance()
if headAdvanced:
Expand Down

0 comments on commit 4e6f5c3

Please sign in to comment.