mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-11 23:30:05 +02:00
dcb032dcdfqa: Ensure wallet unload during walletpassphrase timeout (João Barbosa)75b5d8c4earpc: Fix wallet unload during walletpassphrase timeout (João Barbosa) Pull request description: Backport #14453 to 0.17 Tree-SHA512: fce0adccbb07b6635bb773a71beb4a9b814bceb77bbe7bbc5bcb7d151aabb1148c791622f58c990afe202012ca1971cd466cb536fc6f37e22cdc58738720b593
This commit is contained in:
@@ -8,6 +8,7 @@ Verify that a bitcoind node can load multiple wallet files
|
||||
"""
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.test_node import ErrorMatch
|
||||
@@ -262,7 +263,15 @@ class MultiWalletTest(BitcoinTestFramework):
|
||||
assert 'w1' not in self.nodes[0].listwallets()
|
||||
|
||||
# Successfully unload the wallet referenced by the request endpoint
|
||||
# Also ensure unload works during walletpassphrase timeout
|
||||
wallets = node.listwallets()
|
||||
w2.encryptwallet('test')
|
||||
self.restart_node(0, ['-wallet={}'.format(wallet) for wallet in wallets])
|
||||
w1 = node.get_wallet_rpc(wallet_names[0])
|
||||
w2 = node.get_wallet_rpc(wallet_names[1])
|
||||
w2.walletpassphrase('test', 1)
|
||||
w2.unloadwallet()
|
||||
time.sleep(1.1)
|
||||
assert 'w2' not in self.nodes[0].listwallets()
|
||||
|
||||
# Successfully unload all wallets
|
||||
|
||||
Reference in New Issue
Block a user