HomePhabricator

[avalanche] Do not modify the chaintip in stake contender test

Description

[avalanche] Do not modify the chaintip in stake contender test

Summary: We could take a lock on cs_main to do the modification here, but it's better to just set the mock time prior to mining the block in the first place.

Test Plan:
This does not replicate on my machine but it should fix the CI TSAN failure:
https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_ResourceIntensiveBuilds_BitcoinAbcMasterTsan/853976?buildTab=log&linesState=91&logView=flowAware&focusLine=2282

cmake -GNinja .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=thread
ninja check-avalanche-processor_tests

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17163

Event Timeline