aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_signrawtransaction.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-28 20:45:04 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-07-05 20:40:52 +0200
commit905d672b743edf31531d095ffe800449eaffec69 (patch)
treee027a699270a2c863d944573fa30265060516ba4 /test/functional/rpc_signrawtransaction.py
parent285a65ccfde2e811cfe01e916b998c02ee534a97 (diff)
downloadbitcoin-905d672b743edf31531d095ffe800449eaffec69.tar.xz
test: use script_util helpers for creating P2W{PKH,SH} scripts
Diffstat (limited to 'test/functional/rpc_signrawtransaction.py')
-rwxr-xr-xtest/functional/rpc_signrawtransaction.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py
index ef5d08e7b9..f3627d1e37 100755
--- a/test/functional/rpc_signrawtransaction.py
+++ b/test/functional/rpc_signrawtransaction.py
@@ -6,7 +6,6 @@
from test_framework.blocktools import COINBASE_MATURITY
from test_framework.address import (
- check_script,
script_to_p2sh,
script_to_p2wsh,
)
@@ -20,12 +19,10 @@ from test_framework.util import (
)
from test_framework.messages import (
CTxInWitness,
- sha256,
tx_from_hex,
)
from test_framework.script import (
CScript,
- OP_0,
OP_CHECKLOCKTIMEVERIFY,
OP_CHECKSIG,
OP_CHECKSEQUENCEVERIFY,
@@ -233,7 +230,7 @@ class SignRawTransactionsTest(BitcoinTestFramework):
'P2PKH': key_to_p2pkh_script(embedded_pubkey).hex(),
'P2PK': CScript([hex_str_to_bytes(embedded_pubkey), OP_CHECKSIG]).hex()
}.get(tx_type, "Invalid tx_type")
- redeem_script = CScript([OP_0, sha256(check_script(witness_script))]).hex()
+ redeem_script = script_to_p2wsh_script(witness_script).hex()
addr = script_to_p2sh(redeem_script)
script_pub_key = self.nodes[1].validateaddress(addr)['scriptPubKey']
# Fund that address