Sitelet https://github.com/EOSIO/eos/pull/9930
Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Fix intermittent forked chain test failure - #9930

Merged
linhuang-blockone merged 1 commit into
release/2.1.xfrom
fork_test_failure_fix
Jan 19, 2021
Merged

linhuang-blockone merged 1 commit into
release/2.1.xfrom
fork_test_failure_fix

Conversation

@linhuang-blockone

@linhuang-blockone linhuang-blockone commented Jan 19, 2021 •

Copy link
Copy Markdown
Contributor

Change Description

https://blockone.atlassian.net/browse/EPE-465

When building the list of blocks to search for forking, the range was
for blockNum in range(preKillBlockNum, lastBlockNum. In Python, the range is half closed. This results in an off by one problem if the forking block was the exact lastBlockNum. In EPE-465, lastBlockNum and the forked block number both ware 166, but the search ended t 165. This is also why the problem occurs rarely. The fix is for blockNum in range(preKillBlockNum, lastBlockNum + 1

Fix the problem in both nodeos_forked_chain_test.py and nodeos_short_fork_take_over_test.py

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants