Skip to content

Commit e460232

Browse files
committed
Document fixed attribute behavior in critical test framework classes.
Per @jimmysong's suggestion in bitcoin/bitcoin#14305. Also corrects module for network objects and wrappers.
1 parent 17b42f4 commit e460232

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/functional/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ don't have test cases for.
6060
- When calling RPCs with lots of arguments, consider using named keyword
6161
arguments instead of positional arguments to make the intent of the call
6262
clear to readers.
63+
- Many of the core test framework classes such as `CBlock` and `CTransaction`
64+
don't allow new attributes to be added to their objects at runtime like
65+
typical Python objects allow. This helps prevent unpredictable side effects
66+
from typographical errors or usage of the objects outside of their intended
67+
purpose.
6368

6469
#### RPC and P2P definitions
6570

@@ -72,7 +77,7 @@ P2P messages. These can be found in the following source files:
7277

7378
#### Using the P2P interface
7479

75-
- `mininode.py` contains all the definitions for objects that pass
80+
- `messages.py` contains all the definitions for objects that pass
7681
over the network (`CBlock`, `CTransaction`, etc, along with the network-level
7782
wrappers for them, `msg_block`, `msg_tx`, etc).
7883

0 commit comments

Comments
 (0)