HomePhabricator

Fix a possible message ordering issue in abc_rpc_getavalancheinfo

Description

Fix a possible message ordering issue in abc_rpc_getavalancheinfo

Summary:
D14309 introduced a potential bug in the test, by reconnecting the nodes for checking the proof count. The avahello state is cleared appropriately but the other fields like message_count and last_message are not, leaving the nodes in an unknown state before they reconnect. This can lead to wrong message ordering (like sending pings before the verack) and cause the test to fail.

This reuse was to done to avoid rebuilding the proofs which is costly. This diff addresses the issue by creating a brand new node but reusing the previous proofs so the time save is kept but the internal state issue is no longer there.

Test Plan:

./test/functional/test_runner.py abc_rpc_getavalancheinfo

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Jul 26 2023, 09:43
FabienPushed on Jul 26 2023, 15:01
Reviewer
Restricted Project
Differential Revision
D14311: Fix a possible message ordering issue in abc_rpc_getavalancheinfo
Parents
rABC3f1ebc4b939c: [e.cash] add image sharp package
Branches
Unknown
Tags
Unknown