HomePhabricator

[tests] Remove getnettotals/getpeerinfo consistency test

Description

[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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Oct 28 2020, 10:14
PiRKCommitted on Dec 21 2021, 13:18
PiRKPushed on Dec 21 2021, 13:18
Reviewer
Restricted Project
Differential Revision
D10706: [tests] Remove getnettotals/getpeerinfo consistency test
Parents
rABC16dac8c61a6e: [addrman] Fix Connected() comment
Branches
Unknown
Tags
Unknown