Samuel Dobson
502d22ceed
Merge bitcoin/bitcoin#22541 : Add a new RPC command: restorewallet
...
5fe8100ff36fed6d50c2a25b028f57b25af3504c Change the wallet_backup.py test to use the restorewallet RPC command instead of restoring wallets manually. (lsilva01)
ae23faba6fc5cabc896f1175456d1018576f912d Add a new RPC command: restorewallet (lsilva01)
Pull request description:
As far as I know, there is no command to restore the wallet from a backup file.
The only way to do this is to replace the `wallet.dat` of a newly created wallet with the backup file, which is hardly an intuitive way.
This PR implements the `restorewallet` RPC command which restores the wallet from the backup file.
To test:
First create a backup file:
`$ bitcoin-cli -rpcwallet="wallet-01" backupwallet /home/Backups/wallet-01.bak`
Then restore it in another wallet:
`$ bitcoin-cli restorewallet "restored-wallet-01" /home/Backups/wallet-01.bak`
ACKs for top commit:
achow101:
re-ACK 5fe8100ff36fed6d50c2a25b028f57b25af3504c
prayank23:
tACK 5fe8100ff3
meshcollider:
utACK 5fe8100ff36fed6d50c2a25b028f57b25af3504c
Tree-SHA512: 9639df4d8ad32f255f5b868320dc69878bd9aceb3b471b49dfad500b67681e2d354292b5410982fbf18e25a44ed0c06fd4a0dd010e82807c2e00ff32e84047a1
2021-08-15 16:58:05 +12:00
..
2021-08-12 10:41:11 +01:00
2021-05-24 16:15:05 -07:00
2021-08-02 23:48:32 +10:00
2020-12-08 19:26:30 +01:00
2021-04-19 20:28:46 +02:00
2021-07-28 15:19:34 +02:00
2021-06-10 09:58:45 -05:00
2021-07-22 08:26:30 +02:00
2021-06-10 09:58:45 -05:00
2021-08-02 18:31:02 +02:00
2021-06-02 17:26:44 +01:00
2020-12-31 09:45:41 +01:00
2021-08-12 20:03:00 +03:00
2021-08-15 16:58:05 +12:00
2021-08-09 14:45:12 +12:00
2021-07-14 14:43:45 -07:00
2021-02-01 15:17:28 +01:00
2021-08-13 17:03:01 +08:00
2020-11-19 15:48:24 +01:00
2021-08-11 09:56:34 +08:00
2021-08-10 22:44:54 -03:00
2021-06-09 19:25:13 +08:00
2021-02-18 10:07:37 +00:00
2021-07-30 11:21:51 +02:00
2021-07-30 11:21:51 +02:00
2021-08-13 13:16:55 +02:00
2021-08-12 10:41:11 +01:00
2020-12-31 09:45:41 +01:00
2021-07-30 11:21:51 +02:00
2021-07-30 11:21:51 +02:00
2021-01-31 17:35:16 +01:00
2020-12-31 09:45:41 +01:00
2021-03-17 17:59:22 -07:00
2021-03-17 17:59:22 -07:00
2020-11-18 12:00:57 -05:00
2021-08-03 00:58:12 +08:00
2020-11-18 12:00:57 -05:00
2021-06-12 12:38:17 -07:00
2021-01-12 18:34:25 +10:00
2021-06-18 20:10:07 +02:00
2020-11-18 12:00:57 -05:00
2021-06-18 20:09:23 +02:00
2020-11-18 12:00:57 -05:00
2021-06-10 09:58:45 -05:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-06-03 13:53:31 +02:00
2021-08-05 12:08:33 +02:00
2021-07-09 11:19:36 +02:00
2021-07-07 22:13:01 -07:00
2020-12-31 09:45:41 +01:00
2021-07-30 11:03:44 +02:00
2020-09-24 06:55:34 +03:00
2020-12-31 09:45:41 +01:00
2021-02-01 22:30:05 +02:00
2021-06-17 09:47:08 -04:00
2021-06-17 09:47:08 -04:00
2021-03-01 17:36:16 +01:00
2021-05-04 06:53:32 +02:00
2021-03-23 10:51:43 -04:00
2021-06-12 12:38:17 -07:00
2021-03-23 10:51:43 -04:00
2021-01-04 12:23:16 +08:00
2021-05-04 06:53:37 +02:00
2021-02-01 15:17:28 +01:00
2021-06-30 08:19:12 +10:00
2021-06-30 08:19:12 +10:00
2021-08-02 23:48:32 +10:00
2021-07-01 20:20:52 +02:00
2021-04-12 19:29:03 -04:00
2021-06-16 10:48:58 +02:00
2021-06-16 10:48:58 +02:00
2021-02-10 20:46:25 +00:00
2021-01-15 22:48:15 +01:00
2021-01-15 22:48:15 +01:00
2021-07-05 08:59:38 +03:00
2021-04-23 11:35:15 -07:00
2021-04-07 04:53:26 -04:00
2021-03-29 23:29:42 +02:00
2021-06-28 11:47:05 +02:00
2021-07-09 11:19:37 +02:00
2021-03-16 13:59:18 +01:00
2021-08-12 10:41:11 +01:00
2021-07-12 21:46:59 +08:00
2021-05-24 12:14:16 -07:00
2021-01-24 02:44:53 +01:00
2021-07-14 14:43:45 -07:00
2021-06-12 12:25:28 -07:00
2021-07-22 23:09:52 +02:00
2021-07-22 23:09:42 +02:00
2021-07-22 08:26:30 +02:00
2021-07-08 12:28:23 +02:00
2020-12-08 19:26:30 +01:00
2021-07-05 08:59:38 +03:00
2020-10-27 19:40:44 +01:00
2021-07-14 21:54:32 +03:00
2021-03-29 11:12:26 +08:00
2021-03-04 12:34:46 +08:00
2021-03-30 10:42:45 +02:00
2021-07-29 20:53:36 +08:00
2021-04-29 18:39:01 +03:00
2021-01-07 18:07:09 +02:00
2021-01-04 12:31:31 +08:00
2020-12-31 09:45:41 +01:00
2021-06-30 08:19:12 +10:00
2021-05-27 13:50:11 -04:00
2021-05-19 19:41:05 +02:00
2021-07-15 12:52:38 -07:00
2021-08-14 13:33:47 +08:00
2021-08-04 16:37:12 +02:00
2021-07-27 17:12:16 +02:00
2021-08-03 11:21:15 +08:00
2021-07-08 17:20:35 +02:00
2021-07-30 11:24:59 +02:00
2021-03-30 17:41:13 +02:00
2021-04-06 14:50:17 +08:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-08-04 19:20:32 +08:00
2021-08-04 19:20:32 +08:00
2021-05-13 12:42:21 +01:00
2021-05-24 18:06:35 -07:00
2021-06-12 12:25:28 -07:00
2021-06-12 12:25:28 -07:00
2021-07-14 14:43:45 -07:00
2021-06-12 12:25:28 -07:00
2021-05-04 06:55:31 +02:00
2021-03-29 11:08:29 +08:00
2021-07-05 08:59:38 +03:00
2021-05-14 12:49:16 +02:00
2021-01-29 15:39:44 +08:00
2021-05-31 14:56:17 +02:00
2021-04-04 18:08:36 +02:00
2021-04-04 18:08:36 +02:00
2021-04-13 10:24:31 +08:00
2021-03-15 10:41:30 +08:00
2020-11-25 15:18:33 +01:00
2021-05-05 20:19:03 +02:00
2021-01-26 15:57:28 +08:00
2021-04-05 08:42:15 +02:00
2020-12-31 09:45:41 +01:00
2020-10-12 19:50:16 -07:00
2021-07-05 08:59:38 +03:00
2021-06-27 19:27:25 +02:00
2021-03-02 12:21:32 +00:00
2021-06-18 14:15:39 -04:00
2021-06-18 14:14:15 -04:00
2021-08-05 12:37:28 +01:00
2021-08-05 12:37:28 +01:00
2021-02-27 01:08:09 +10:00
2021-07-20 13:12:42 +01:00
2021-04-07 19:26:25 +01:00
2020-10-12 12:14:53 -07:00
2020-12-31 09:45:41 +01:00
2021-05-24 12:14:16 -07:00
2021-08-06 10:04:59 +01:00
2021-08-05 12:37:28 +01:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-12-31 09:45:41 +01:00
2021-06-30 08:19:12 +10:00
2021-06-30 08:19:12 +10:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00