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
Lint
Lint Not Applicable
Unit
Tests Not Applicable