Page MenuHomePhabricator

test: Replace use of (dis)?connect_nodes globals
ClosedPublic

Authored by PiRK on Nov 26 2021, 13:35.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC572f52819dc9: test: Replace use of (dis)?connect_nodes globals
Summary

This is a 3 commit PR that replaces all uses of util.(dis)?connect_nodes with TestFramework.(dis)?connect_nodes. This reduces the number of imports by a lot and leave only one single way of doing this operation.

A later scripted-diff commit replaces the majority of uses, which all
follow this pattern:

`(dis)?connect_nodes(self.nodes[a], self.nodes[b]))`

This commit replaces the few "special cases".

This is a backport of core#19667 [1/3]
https://github.com/bitcoin/bitcoin/pull/19967/commits/be386840d4a394a1b6221fb7d0fa2b0bc4b1d413

The line touched in rpc_psbt is in a segwit related test that does not exist in Bitcoin ABC.

Test Plan

ninja check-functional

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Nov 26 2021, 13:35

use node.index instead of a literal int, when available

simplify abc_p2p_proof_inventory: enumerate is not needed when using node.index

This revision is now accepted and ready to land.Nov 29 2021, 08:30