From e46023287689fc8e79b9a82fe1a827d87c769423 Mon Sep 17 00:00:00 2001 From: Justin Turner Arthur Date: Wed, 26 Sep 2018 22:13:06 -0500 Subject: [PATCH] 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. --- test/functional/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/functional/README.md b/test/functional/README.md index 6929ab59912..d40052ac939 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -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 @@ -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).