aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_permissions.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-15 23:02:28 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-21 14:28:05 +0200
commit2ce7b47958c4a10ba20dc86c011d71cda4b070a5 (patch)
tree9d3ad9433f7b5b054f5b072ebf33462399d9f502 /test/functional/p2p_permissions.py
parent965e93743454112c0c3c66bf24852f63ee07b862 (diff)
downloadbitcoin-2ce7b47958c4a10ba20dc86c011d71cda4b070a5.tar.xz
test: introduce `tx_from_hex` helper for tx deserialization
`FromHex` is mostly used for transactions, so we introduce a shortcut `tx_from_hex` for `FromHex(CTransaction, hex_str)`.
Diffstat (limited to 'test/functional/p2p_permissions.py')
-rwxr-xr-xtest/functional/p2p_permissions.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py
index 62652d949d..594a28d662 100755
--- a/test/functional/p2p_permissions.py
+++ b/test/functional/p2p_permissions.py
@@ -9,9 +9,8 @@ Test that permissions are correctly calculated and applied
from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE
from test_framework.messages import (
- CTransaction,
CTxInWitness,
- FromHex,
+ tx_from_hex,
)
from test_framework.p2p import P2PDataStore
from test_framework.script import (
@@ -105,8 +104,7 @@ class P2PPermissionsTests(BitcoinTestFramework):
p2p_rebroadcast_wallet = self.nodes[1].add_p2p_connection(P2PDataStore())
self.log.debug("Send a tx from the wallet initially")
- tx = FromHex(
- CTransaction(),
+ tx = tx_from_hex(
self.nodes[0].createrawtransaction(
inputs=[{
'txid': block_op_true['tx'][0],