diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-06-02 00:58:47 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-06-02 12:59:13 +0200 |
commit | 1bace0cfeef35c4413769474173a692093a046f3 (patch) | |
tree | 284225ab9ec27551a133653ab8b42271c36ffcab /test/functional | |
parent | 1c7ef0abd11f35a27cc860ceb7e075b78f53cecf (diff) | |
download | bitcoin-1bace0cfeef35c4413769474173a692093a046f3.tar.xz |
test: check `replaceable` mismatch error in `createrawtransaction` RPC
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/rpc_rawtransaction.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index fecb8310b9..1f95814e18 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -17,6 +17,7 @@ from decimal import Decimal from test_framework.blocktools import COINBASE_MATURITY from test_framework.messages import ( + BIP125_SEQUENCE_NUMBER, CTransaction, tx_from_hex, ) @@ -220,6 +221,10 @@ class RawTransactionsTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "Invalid parameter, key-value pair must contain exactly one key", self.nodes[0].createrawtransaction, [], [{'a': 1, 'b': 2}]) assert_raises_rpc_error(-8, "Invalid parameter, key-value pair not an object as expected", self.nodes[0].createrawtransaction, [], [['key-value pair1'], ['2']]) + # Test `createrawtransaction` mismatch between sequence number(s) and `replaceable` option + assert_raises_rpc_error(-8, "Invalid parameter combination: Sequence number(s) contradict replaceable option", + self.nodes[0].createrawtransaction, [{'txid': TXID, 'vout': 0, 'sequence': BIP125_SEQUENCE_NUMBER+1}], {}, 0, True) + # Test `createrawtransaction` invalid `locktime` assert_raises_rpc_error(-3, "Expected type number", self.nodes[0].createrawtransaction, [], {}, 'foo') assert_raises_rpc_error(-8, "Invalid parameter, locktime out of range", self.nodes[0].createrawtransaction, [], {}, -1) |