diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-12-08 17:10:41 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-12-09 08:48:08 +0100 |
commit | 20411903d7b356ebb174df2daad1dcd5d6117f79 (patch) | |
tree | a75aa20d201c64076bc664a00439e1a3017f07ec /qa/rpc-tests/invalidblockrequest.py | |
parent | 9fc6ed6003da42f035309240c715ce0fd063ec03 (diff) |
test: Add basic test for `reject` code
Extend P2P test framework to make it possible to expect reject
codes for transactions and blocks.
Diffstat (limited to 'qa/rpc-tests/invalidblockrequest.py')
-rwxr-xr-x | qa/rpc-tests/invalidblockrequest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/invalidblockrequest.py b/qa/rpc-tests/invalidblockrequest.py index 6a7980cd45..a74ecb1288 100755 --- a/qa/rpc-tests/invalidblockrequest.py +++ b/qa/rpc-tests/invalidblockrequest.py @@ -6,7 +6,7 @@ from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * -from test_framework.comptool import TestManager, TestInstance +from test_framework.comptool import TestManager, TestInstance, RejectResult from test_framework.mininode import * from test_framework.blocktools import * import logging @@ -97,7 +97,7 @@ class InvalidBlockRequestTest(ComparisonTestFramework): assert(block2_orig.vtx != block2.vtx) self.tip = block2.sha256 - yield TestInstance([[block2, False], [block2_orig, True]]) + yield TestInstance([[block2, RejectResult(16,'bad-txns-duplicate')], [block2_orig, True]]) height += 1 ''' @@ -112,7 +112,7 @@ class InvalidBlockRequestTest(ComparisonTestFramework): block3.rehash() block3.solve() - yield TestInstance([[block3, False]]) + yield TestInstance([[block3, RejectResult(16,'bad-cb-amount')]]) if __name__ == '__main__': |