Skip to content

Commit

Permalink
Document fixed attribute behavior in critical test framework classes.
Browse files Browse the repository at this point in the history
Per @jimmysong's suggestion in bitcoin/bitcoin#14305. Also corrects
module for network objects and wrappers.
  • Loading branch information
JustinTArthur committed Sep 27, 2018
1 parent 17b42f4 commit e460232
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/functional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ don't have test cases for.
- When calling RPCs with lots of arguments, consider using named keyword
arguments instead of positional arguments to make the intent of the call
clear to readers.
- Many of the core test framework classes such as `CBlock` and `CTransaction`
don't allow new attributes to be added to their objects at runtime like
typical Python objects allow. This helps prevent unpredictable side effects
from typographical errors or usage of the objects outside of their intended
purpose.

#### RPC and P2P definitions

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

#### Using the P2P interface

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

Expand Down

0 comments on commit e460232

Please sign in to comment.