Page MenuHomePhabricator

scripted-diff: Rename mininode_lock to p2p_lock
ClosedPublic

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

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCa514e5c8c81b: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
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