aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-09-24 16:29:21 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-09-24 17:09:44 +0200
commit01b5cfb9511a22ce4e1525d5e9f2185c6e4401bd (patch)
tree94d56db1bbb96ae9dec13b20d8a67f8bb672cc80 /test/functional/test_framework
parent8e9801bfc4ac4fa33fd5fe802e43ede36d7b323b (diff)
parentfaae0988d6abb50039026a49543eef134eb9103f (diff)
downloadbitcoin-01b5cfb9511a22ce4e1525d5e9f2185c6e4401bd.tar.xz
Merge bitcoin/bitcoin#23047: test: Use MiniWallet in mempool_persist
faae0988d6abb50039026a49543eef134eb9103f test: Check other fields are loaded correctly as well (MarcoFalke) fa4db9261725de8c0e5c73d13df1cddd6bbaeab0 test: Remove unused self.connect_nodes (MarcoFalke) fafb7b7a892b24405d6b6291d6d72f0e88462f2f test: pep8 (MarcoFalke) fa32cb2467056b3fd47f0b88215311faec8fd5a4 test: Use MiniWallet in mempool_persist (MarcoFalke) faca688a8579d7e30d056b6847789fdd56fc0bf4 test: Add MiniWallet get_descriptor function (MarcoFalke) Pull request description: ACKs for top commit: laanwj: Code review ACK faae0988d6abb50039026a49543eef134eb9103f Tree-SHA512: 6124f16ee1f3f416c50dc07aebe8846ff7e2b7c8e5dd84f9517cb5f1df021b9e57ed7c7e17bc099a37c663cd93f6d417c5e0622c0b359956403d53e705eb5549
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/wallet.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/test_framework/wallet.py b/test/functional/test_framework/wallet.py
index 2ffeb2d115..cea59c6d69 100644
--- a/test/functional/test_framework/wallet.py
+++ b/test/functional/test_framework/wallet.py
@@ -82,7 +82,7 @@ class MiniWallet:
def rescan_utxos(self):
"""Drop all utxos and rescan the utxo set"""
self._utxos = []
- res = self._test_node.scantxoutset(action="start", scanobjects=[f'raw({self._scriptPubKey.hex()})'])
+ res = self._test_node.scantxoutset(action="start", scanobjects=[self.get_descriptor()])
assert_equal(True, res['success'])
for utxo in res['unspents']:
self._utxos.append({'txid': utxo['txid'], 'vout': utxo['vout'], 'value': utxo['amount']})
@@ -110,12 +110,15 @@ class MiniWallet:
def generate(self, num_blocks):
"""Generate blocks with coinbase outputs to the internal address, and append the outputs to the internal list"""
- blocks = self._test_node.generatetodescriptor(num_blocks, f'raw({self._scriptPubKey.hex()})')
+ blocks = self._test_node.generatetodescriptor(num_blocks, self.get_descriptor())
for b in blocks:
cb_tx = self._test_node.getblock(blockhash=b, verbosity=2)['tx'][0]
self._utxos.append({'txid': cb_tx['txid'], 'vout': 0, 'value': cb_tx['vout'][0]['value']})
return blocks
+ def get_descriptor(self):
+ return self._test_node.getdescriptorinfo(f'raw({self._scriptPubKey.hex()})')['descriptor']
+
def get_address(self):
return self._address