aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_segwit.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-16 00:32:18 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-21 14:30:03 +0200
commita79396fe5f8f81c78cf84117a87074c6ff6c9d95 (patch)
tree6d5a3a187d6968bd1c5236f1b20bb5ba7759628e /test/functional/feature_segwit.py
parent2ce7b47958c4a10ba20dc86c011d71cda4b070a5 (diff)
downloadbitcoin-a79396fe5f8f81c78cf84117a87074c6ff6c9d95.tar.xz
test: remove `ToHex` helper, use .serialize().hex() instead
Diffstat (limited to 'test/functional/feature_segwit.py')
-rwxr-xr-xtest/functional/feature_segwit.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index 0f62701305..42910904d7 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -23,7 +23,6 @@ from test_framework.messages import (
CTransaction,
CTxIn,
CTxOut,
- ToHex,
sha256,
tx_from_hex,
)
@@ -268,7 +267,7 @@ class SegWitTest(BitcoinTestFramework):
tx = CTransaction()
tx.vin.append(CTxIn(COutPoint(int(txid1, 16), 0), b''))
tx.vout.append(CTxOut(int(49.99 * COIN), CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE])))
- tx2_hex = self.nodes[0].signrawtransactionwithwallet(ToHex(tx))['hex']
+ tx2_hex = self.nodes[0].signrawtransactionwithwallet(tx.serialize().hex())['hex']
txid2 = self.nodes[0].sendrawtransaction(tx2_hex)
tx = tx_from_hex(tx2_hex)
assert not tx.wit.is_null()
@@ -285,7 +284,7 @@ class SegWitTest(BitcoinTestFramework):
tx.vin.append(CTxIn(COutPoint(int(txid2, 16), 0), b""))
tx.vout.append(CTxOut(int(49.95 * COIN), CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE]))) # Huge fee
tx.calc_sha256()
- txid3 = self.nodes[0].sendrawtransaction(hexstring=ToHex(tx), maxfeerate=0)
+ txid3 = self.nodes[0].sendrawtransaction(hexstring=tx.serialize().hex(), maxfeerate=0)
assert tx.wit.is_null()
assert txid3 in self.nodes[0].getrawmempool()