Page MenuHomePhabricator

scripted-diff: Rename mininode_lock to p2p_lock

Authored by PiRK on Mon, May 24, 08:58.


Group Reviewers
Restricted Project
rABCa514e5c8c81b: scripted-diff: Rename mininode_lock to p2p_lock

PR description:

New contributors are often confused by the terminology in the test framework, and what the difference between a node and a peer is. To summarize:

  • a 'node' is a bitcoind instance. This is the thing whose behavior is being tested. Each bitcoind node is managed by a python TestNode object which is used to start/stop the node, manage the node's data directory, read state about the node (eg process status, log file), and interact with the node over different interfaces.
  • one of the interfaces that we can use to interact with the node is the p2p interface. Each connection to a node using this interface is managed by a python P2PInterface or derived object (which is owned by the TestNode object). We can open zero, one or many p2p connections to each bitcoind node. The node sees these connections as 'peers'.

For historic reasons, the word 'mininode' has been used to refer to those p2p interface objects that we use to connect to the bitcoind node (the code was originally taken from the 'mini-node' branch of However that name has proved to be confusing for new contributors, so rename the remaining references.

sed -i 's/mininode_lock/p2p_lock/g' $(git grep -l "mininode_lock")

This is a partial backport of core#19760 [1/4]

Backport note: I did not cherry-pick the commit, I ran the sed script. The only deviations from the script are style changes from the linter.

Test Plan

ninja check-functional

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mon, May 24, 08:58
PiRK retitled this revision from scritred-diff: Rename mininode_lock to p2p_lock to scripted-diff: Rename mininode_lock to p2p_lock.Mon, May 24, 08:58
This revision is now accepted and ready to land.Mon, May 24, 16:54