aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_nulldummy.py
diff options
context:
space:
mode:
authorismaelsadeeq <ask4ismailsadiq@gmail.com>2023-03-28 16:58:16 +0100
committerismaelsadeeq <ask4ismailsadiq@gmail.com>2023-03-28 16:58:16 +0100
commite47ce42f670fc43859c157766b342509ab5916f9 (patch)
treee77deb4881e65aa262ce591f1dce3293c1c25910 /test/functional/feature_nulldummy.py
parent4142d19d741d6432ba95f3452f0d949941d89d5c (diff)
refactor: use address_to_scriptpubkey to retrieve addresses scriptpubkey
This commit updates the code by replacing the RPC call used to decode an address and retrieve its corresponding scriptpubkey with the address_to_scriptpubkey function. address_to_scriptpubkey function can now decode all addresses formats, which makes it more efficient to use.
Diffstat (limited to 'test/functional/feature_nulldummy.py')
-rwxr-xr-xtest/functional/feature_nulldummy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py
index d7558c830e..c95657dbbb 100755
--- a/test/functional/feature_nulldummy.py
+++ b/test/functional/feature_nulldummy.py
@@ -14,6 +14,7 @@ Generate COINBASE_MATURITY (CB) more blocks to ensure the coinbases are mature.
"""
import time
+from test_framework.address import address_to_scriptpubkey
from test_framework.blocktools import (
COINBASE_MATURITY,
NORMAL_GBT_REQUEST_PARAMS,
@@ -77,7 +78,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
cms = self.nodes[0].createmultisig(1, [self.pubkey])
wms = self.nodes[0].createmultisig(1, [self.pubkey], 'p2sh-segwit')
self.ms_address = cms["address"]
- ms_unlock_details = {"scriptPubKey": self.nodes[0].validateaddress(self.ms_address)["scriptPubKey"],
+ ms_unlock_details = {"scriptPubKey": address_to_scriptpubkey(self.ms_address).hex(),
"redeemScript": cms["redeemScript"]}
self.wit_ms_address = wms['address']