mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Run dumpwallet for legacy wallets only in wallet_backup.py
Descriptor wallets don't support dumpwallet, so make the tests that do dumpwallet legacy wallet only.
This commit is contained in:
parent
6c6639ac9f
commit
310b0fde04
2 changed files with 24 additions and 20 deletions
|
@ -88,6 +88,7 @@ BASE_SCRIPTS = [
|
|||
'wallet_hd.py',
|
||||
'wallet_hd.py --descriptors',
|
||||
'wallet_backup.py',
|
||||
'wallet_backup.py --descriptors',
|
||||
# vv Tests less than 5m vv
|
||||
'mining_getblocktemplate_longpoll.py',
|
||||
'feature_maxuploadtarget.py',
|
||||
|
|
|
@ -135,10 +135,12 @@ class WalletBackupTest(BitcoinTestFramework):
|
|||
self.log.info("Backing up")
|
||||
|
||||
self.nodes[0].backupwallet(os.path.join(self.nodes[0].datadir, 'wallet.bak'))
|
||||
self.nodes[0].dumpwallet(os.path.join(self.nodes[0].datadir, 'wallet.dump'))
|
||||
self.nodes[1].backupwallet(os.path.join(self.nodes[1].datadir, 'wallet.bak'))
|
||||
self.nodes[1].dumpwallet(os.path.join(self.nodes[1].datadir, 'wallet.dump'))
|
||||
self.nodes[2].backupwallet(os.path.join(self.nodes[2].datadir, 'wallet.bak'))
|
||||
|
||||
if not self.options.descriptors:
|
||||
self.nodes[0].dumpwallet(os.path.join(self.nodes[0].datadir, 'wallet.dump'))
|
||||
self.nodes[1].dumpwallet(os.path.join(self.nodes[1].datadir, 'wallet.dump'))
|
||||
self.nodes[2].dumpwallet(os.path.join(self.nodes[2].datadir, 'wallet.dump'))
|
||||
|
||||
self.log.info("More transactions")
|
||||
|
@ -183,6 +185,7 @@ class WalletBackupTest(BitcoinTestFramework):
|
|||
assert_equal(self.nodes[1].getbalance(), balance1)
|
||||
assert_equal(self.nodes[2].getbalance(), balance2)
|
||||
|
||||
if not self.options.descriptors:
|
||||
self.log.info("Restoring using dumped wallet")
|
||||
self.stop_three()
|
||||
self.erase_three()
|
||||
|
|
Loading…
Add table
Reference in a new issue