Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_backup.py
Show All 24 Lines | |||||
1/2/3 are shutdown, and their wallets erased. | 1/2/3 are shutdown, and their wallets erased. | ||||
Then restore using wallet.dat backup. And | Then restore using wallet.dat backup. And | ||||
confirm 1/2/3/4 balances are same as before. | confirm 1/2/3/4 balances are same as before. | ||||
Shutdown again, restore using importwallet, | Shutdown again, restore using importwallet, | ||||
and confirm again balances are correct. | and confirm again balances are correct. | ||||
""" | """ | ||||
from decimal import Decimal | |||||
import os | |||||
from random import randint | from random import randint | ||||
import shutil | import shutil | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | from test_framework.util import ( | ||||
assert_equal, | |||||
assert_raises_rpc_error, | |||||
connect_nodes, | |||||
sync_blocks, | |||||
sync_mempools, | |||||
) | |||||
class WalletBackupTest(BitcoinTestFramework): | class WalletBackupTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 4 | self.num_nodes = 4 | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
# nodes 1, 2,3 are spenders, let's give them a keypool=100 | # nodes 1, 2,3 are spenders, let's give them a keypool=100 | ||||
self.extra_args = [["-keypool=100"], | self.extra_args = [["-keypool=100"], | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |