HomePhabricator

scripted-diff: Rename mininode_lock to p2p_lock

Description

scripted-diff: Rename mininode_lock to p2p_lock

Summary:
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 https://github.com/jgarzik/pynode/tree/mini-node). However that name has proved to be confusing for new contributors, so rename the remaining references.

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

This is a partial backport of core#19760 [1/4]
https://github.com/bitcoin/bitcoin/pull/19760/commits/85165d4332b0f72d30e0c584b476249b542338e6

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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
jnewbery <john@johnnewbery.com>Authored on May 24 2021, 08:29
PiRKCommitted on May 24 2021, 19:10
PiRKPushed on May 24 2021, 19:10
Reviewer
Restricted Project
Differential Revision
D9572: scripted-diff: Rename mininode_lock to p2p_lock
Parents
rABC2f33f59fea6f: [Cashtab] Reduce bundle size by about ~50%
Branches
Unknown
Tags
Unknown

Event Timeline