This should really be 2 PRs, but the CNode change is helpful to show the script’s usefulness.
Scriptable changes verifier
We often make simple changes that produce large diffs, but are easily scriptable. A large search+replace like #9902 is the most obvious example.
It’s useful both for reviewers, and for posterity, to include these transforming scripts in the commit message. And once there, we can use c-i to verify the scripted changes before merging.
A simple script checks for commits containing the line: -BEGIN VERIFY SCRIPT-
, and reads until it the line: -END VERIFY SCRIPT-
, or the end of the commit message.
The resulting script should exactly transform the previous commit into the current one. Any remaining diff signals an error.
Travis will check each commit for these scripts, and fail if any script fails.
Make CNode’s id field private
This was useful to check the safety of #10176 (making it easier to see where the node’s id is used), and is a general encapsulation improvement.