Page MenuHomePhabricator

Fix a potential race in p2p_inv_download
ClosedPublic

Authored by Fabien on Aug 25 2023, 10:52.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC9e53f9b466d6: Fix a potential race in p2p_inv_download
Summary

The occurrence can be seen here: https://build.bitcoinabc.org/viewLog.html?buildId=606857&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterCoverage&tab=buildResultsDiv&guest=1

In the test_inv_tx case, node 0 sends a transaction to node 1 and the test looks into the log for node 1 to receive the tx inventory message. But the debug log lookup does not embed the tx relaying, so it might be received and the message printed before the test starts looking at the debug log.
In the example linked the tx is received as expected since the log shows that node 1 is requesting the data from node 0, but the expected inv message has been missed.

Test Plan
./test/functional/test_runnner.py p2p_inv_download

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable