Page MenuHomePhabricator

[tests] Remove getnettotals/getpeerinfo consistency test
ClosedPublic

Authored by PiRK on Dec 21 2021, 07:51.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC123f1731af31: [tests] Remove getnettotals/getpeerinfo consistency test
Summary

core#20258:

The CNode member nSendBytes is incremented under the node's lock cs_vSend. However, RecordBytesSent is not. An RPC thread that acquires the cs_vSend lock puts the message handler thread on hold. While the thread is on hold, getnettotals returns "stale" values or values that don't add up.

We make no guarantees about consistency between RPC calls.

core#20299

The test fails intermittently because getpeerinfo and getnettotals are not synchronised, so a wait_until is needed for each RPC (separately).

This is a backport of core#20258 and core#20299

Test Plan

test/functional/test_runner.py rpc_net.py

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Dec 21 2021, 07:51
Fabien requested changes to this revision.Dec 21 2021, 12:46
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/rpc_net.py
101 ↗(On Diff #31496)

>=

This revision now requires changes to proceed.Dec 21 2021, 12:46
This revision is now accepted and ready to land.Dec 21 2021, 13:08