diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-13 11:36:48 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-13 11:37:37 +0200 |
commit | 44c1b1c9bb54082625c7ad76af25473abf79f866 (patch) | |
tree | 0c9b8fb64cefc3b353258ac4c93be18e6ec7d153 /qa/rpc-tests/test_framework/mininode.py | |
parent | e1486eb95c50834179d42e3d056e11c2f7b4ebff (diff) | |
parent | ff2dcf274d8a69de07a8cbd3ada3aaaca38501cf (diff) | |
download | bitcoin-44c1b1c9bb54082625c7ad76af25473abf79f866.tar.xz |
Merge #8141: Continuing port of java comparison tool
ff2dcf2 Tests: Edit bloated varint test and add option for 'barely expensive' tests (mrbandrews)
12c5a16 Catch exceptions from non-canonical encoding and print only to log (mrbandrews)
291f8aa Continuing port of java comptool (mrbandrews)
8c9e681 Tests: Rework blockstore to avoid re-serialization. (mrbandrews)
Diffstat (limited to 'qa/rpc-tests/test_framework/mininode.py')
-rwxr-xr-x | qa/rpc-tests/test_framework/mininode.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 1617daa200..c0b59f3857 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -836,6 +836,18 @@ class msg_block(object): def __repr__(self): return "msg_block(block=%s)" % (repr(self.block)) +# for cases where a user needs tighter control over what is sent over the wire +# note that the user must supply the name of the command, and the data +class msg_generic(object): + def __init__(self, command, data=None): + self.command = command + self.data = data + + def serialize(self): + return self.data + + def __repr__(self): + return "msg_generic()" class msg_getaddr(object): command = b"getaddr" |