Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251res0_rpc = self.nodes[3].get_wallet_rpc("res0")252res1_rpc = self.nodes[3].get_wallet_rpc("res1")253res2_rpc = self.nodes[3].get_wallet_rpc("res2")255assert_equal(res0_rpc.getbalance(), balance0)256assert_equal(res1_rpc.getbalance(), balance1)257assert_equal(res2_rpc.getbalance(), balance2)259self.restore_wallet_existent_name()260self.test_restore_existent_dir()261self.test_restore_into_unnamed_wallet()263# Backup to source wallet file must fail264sourcePaths = [265os.path.join(self.nodes[0].wallets_path, self.default_wallet_name, self.wallet_data_filename),266os.path.join(self.nodes[0].wallets_path, '.', self.default_wallet_name, self.wallet_data_filename),267os.path.join(self.nodes[0].wallets_path, self.default_wallet_name),268os.path.join(self.nodes[0].wallets_path)]270for sourcePath in sourcePaths:271assert_raises_rpc_error(-4, "backup failed", self.nodes[0].backupwallet, sourcePath)273self.test_pruned_wallet_backup()276if __name__ == '__main__':277WalletBackupTest(__file__).main()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.