Page MenuHomePhabricator

Fix a possible message ordering issue in abc_rpc_getavalancheinfo
ClosedPublic

Authored by Fabien on Jul 26 2023, 09:44.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_getavalanchinfo_message_ordering
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24595
Build 48787: Build Diffbuild-debug · build-without-wallet · build-clang · build-clang-tidy · build-diff
Build 48786: arc lint + arc unit