HomePhabricator

[avalanche] Make sure each proof is added to contender cache before mining the…

Description

[avalanche] Make sure each proof is added to contender cache before mining the next block in contender voting test

Summary:
As part of generating proofs, it is possible for the node to mine the next block before adding the proof to the contender cache because mining a block takes a lock on cs_main, for which addStakeContender() also requires a lock. This patch ensures the proof was added to the cache before generating the next proof and mining the block associated with that.

This should fix some flakiness with the contender voting test.

Test Plan:

./test/functional/test_runner.py abc_p2p_avalanche_contender_voting

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Dec 12 2024, 21:58
roqqitPushed on Dec 18 2024, 22:36
Reviewer
Restricted Owners Package
Differential Revision
D17345: [avalanche] Make sure each proof is added to contender cache before mining the next block in contender voting test
Parents
rABC7e2b466cd342: [mock-chronik-client] Add support for Agora ws subscriptions
Branches
Unknown
Tags
Unknown