diff options
author | Matt Corallo <git@bluematt.me> | 2019-08-01 17:54:48 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2019-08-02 15:37:13 -0400 |
commit | 970de70bdd3542e75b73c79b06f143168c361494 (patch) | |
tree | 727c0319bc969dea20689051dcb7999b3fb1c0b0 /test/functional | |
parent | e653eeff7651d823407e2e31a89176cc0b240c62 (diff) |
Dump transaction version as an unsigned integer in RPC/TxToUniv
Consensus-wise we already treat it as an unsigned integer (the
only rules around it are in CSV/locktime handling), but changing
the underlying data type means touching consensus code for a
simple cleanup change, which isn't really worth it.
See-also, https://github.com/rust-bitcoin/rust-bitcoin/pull/299
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/rpc_rawtransaction.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index 4338675270..c2b80bc3dd 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -417,11 +417,12 @@ class RawTransactionsTest(BitcoinTestFramework): #################################### # Test the minimum transaction version number that fits in a signed 32-bit integer. + # As transaction version is unsigned, this should convert to its unsigned equivalent. tx = CTransaction() tx.nVersion = -0x80000000 rawtx = ToHex(tx) decrawtx = self.nodes[0].decoderawtransaction(rawtx) - assert_equal(decrawtx['version'], -0x80000000) + assert_equal(decrawtx['version'], 0x80000000) # Test the maximum transaction version number that fits in a signed 32-bit integer. tx = CTransaction() |