fanquake
04978c2e18
Merge bitcoin/bitcoin#29117 : wallettool: Always be able to dump a wallet's database
...
d83bea42d1f0ffb0899a6de3556c489543468995 wallettool: Don't create CWallet when dumping DB (Andrew Chow)
40c80e36b1a204ed133acc403016a6cb1a92051e wallettool: Don't unilaterally reset wallet_instance if loading error (Ava Chow)
Pull request description:
https://github.com/bitcoin/bitcoin/issues/29109#issuecomment-1863449058 reports that a wallet with noncritical errors cannot be dumped with `bitcoin-wallet dump`. This was caused by an erroneous reset of the wallet pointer when the loading the wallet returns something other than `LOAD_OK`. Not all errors are errors that require aborting, so unilaterally resetting the pointer at that time is incorrect. The first commit resolves this issue.
Furthermore, if a wallet has loading errors, that should not prevent the wallet tool from dumping the wallet. The wallet application logic should not get in the way of performing such a low level database operation, especially when it's primary usage is for debugging potentially corrupted wallets. The 2nd commit is taken from #28710 and changes the `dump` to stop at making a `WalletDatabase` rather than making a `CWallet` only to retrieve the underlying `WalletDatabase`.
ACKs for top commit:
furszy:
Code review ACK d83bea42d1
BrandonOdiwuor:
Code Review ACK d83bea42d1f0ffb0899a6de3556c489543468995
Tree-SHA512: 425d712dfff1002bd81272aca0bae1016f9126a3c89506f8cb7cf0a0ec9f33d0c03b8d03896394f3a45c2998e59047e19218dfd08dc8a5f40e8625134e886b0f
2024-01-05 17:40:44 +00:00
..
2024-01-02 11:12:32 -05:00
2023-12-11 17:42:17 +01:00
2023-10-04 11:11:37 +02:00
2023-11-16 11:36:22 +10:00
2023-09-20 21:11:55 +01:00
2023-12-04 15:39:15 -04:00
2023-12-04 15:39:15 -04:00
2024-01-05 10:42:10 +00:00
2023-05-20 12:08:13 +02:00
2024-01-03 11:23:27 +00:00
2022-09-29 16:43:30 +01:00
2023-01-31 18:48:50 +01:00
2022-10-23 15:03:04 +01:00
2024-01-05 10:42:10 +00:00
2024-01-03 11:23:27 +00:00
2023-11-28 08:44:41 -05:00
2023-12-23 13:26:00 +01:00
2024-01-05 10:42:10 +00:00
2023-12-08 06:54:00 -03:00
2024-01-04 14:40:28 +00:00
2023-11-19 18:43:29 +01:00
2024-01-05 15:37:06 +00:00
2023-07-27 14:24:52 +02:00
2024-01-05 11:22:31 +01:00
2024-01-05 17:40:44 +00:00
2023-12-11 18:22:13 +01:00
2023-10-12 11:27:19 +02:00
2023-12-15 15:20:54 +01:00
2023-10-30 14:59:17 +01:00
2023-10-24 18:52:00 +02:00
2023-09-05 10:13:25 +02:00
2023-09-12 12:14:31 -04:00
2023-10-25 22:46:55 +02:00
2023-10-04 18:08:49 +02:00
2023-12-06 11:22:42 -05:00
2023-12-06 11:22:42 -05:00
2023-11-21 17:37:25 +01:00
2023-11-21 17:37:25 +01:00
2023-05-04 20:57:51 +01:00
2023-11-02 14:09:27 -04:00
2023-11-02 14:09:27 -04:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-09-10 16:11:52 -04:00
2023-09-10 16:11:52 -04:00
2023-12-04 15:39:15 -04:00
2023-05-20 12:08:13 +02:00
2023-12-11 13:08:46 -05:00
2023-11-16 11:36:22 +10:00
2023-05-20 12:08:13 +02:00
2023-12-04 15:39:15 -04:00
2023-11-16 11:14:13 +10:00
2023-11-14 08:45:30 +10:00
2023-11-28 12:42:07 +01:00
2023-08-17 18:28:15 +02:00
2022-12-24 23:49:50 +00:00
2023-10-20 16:29:02 +02:00
2023-05-25 19:24:05 +02:00
2023-05-25 19:24:05 +02:00
2023-05-10 10:39:58 +02:00
2023-05-10 10:39:58 +02:00
2023-04-20 06:08:22 -07:00
2023-10-03 10:52:17 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-11-21 13:15:44 +00:00
2023-11-24 14:41:58 +00:00
2023-08-14 17:38:27 -04:00
2023-12-11 18:22:13 +01:00
2023-11-16 11:36:22 +10:00
2023-12-11 18:22:13 +01:00
2023-01-31 11:50:10 +00:00
2023-09-12 12:07:39 +02:00
2023-09-12 12:07:39 +02:00
2023-03-15 16:42:42 +01:00
2023-03-15 16:42:42 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-04-19 10:48:30 +02:00
2023-11-30 11:28:19 +01:00
2023-05-20 12:08:13 +02:00
2023-03-23 12:52:00 +01:00
2023-04-03 14:41:22 +01:00
2022-12-24 23:49:50 +00:00
2023-11-16 11:36:22 +10:00
2023-10-12 11:27:19 +02:00
2022-12-12 21:06:04 +00:00
2023-09-19 15:54:17 -06:00
2023-12-04 15:39:15 -04:00
2023-12-04 15:39:15 -04:00
2023-10-30 14:44:40 +01:00
2023-10-05 14:11:13 +02:00
2024-01-05 10:42:10 +00:00
2023-12-04 15:39:15 -04:00
2023-09-19 16:48:43 +00:00
2023-08-14 17:38:27 -04:00
2023-12-23 13:26:00 +01:00
2023-12-23 13:26:00 +01:00
2023-08-29 16:41:22 +01:00
2023-08-29 16:41:22 +01:00
2023-12-14 15:14:00 -05:00
2024-01-02 11:12:32 -05:00
2023-09-01 07:39:00 +01:00
2023-10-19 13:25:49 +01:00
2023-11-20 15:57:50 -03:00
2023-07-19 10:26:11 +01:00
2023-11-20 15:57:56 -03:00
2023-06-16 10:38:19 +01:00
2023-01-28 15:24:13 +00:00
2023-09-13 11:37:45 +01:00
2023-11-28 17:49:41 +01:00
2023-11-28 17:49:41 +01:00
2023-10-26 14:29:47 -04:00
2022-12-24 23:49:50 +00:00
2023-12-08 13:14:46 +00:00
2023-11-23 13:43:39 +01:00
2023-05-30 16:27:21 -03:00
2023-12-23 13:26:00 +01:00
2023-12-06 11:22:42 -05:00
2023-07-19 12:43:05 -06:00
2023-10-05 15:10:32 +02:00
2023-11-07 14:11:58 -05:00
2023-11-07 14:11:58 -05:00
2023-12-06 11:22:42 -05:00
2023-12-02 22:03:08 +01:00
2023-11-20 14:02:27 +01:00
2022-12-24 23:49:50 +00:00
2023-08-14 17:38:27 -04:00
2023-08-14 17:38:27 -04:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-03-26 15:49:52 +02:00
2023-11-13 14:17:59 +01:00
2023-10-13 10:30:49 +02:00
2023-11-30 11:28:19 +01:00
2023-11-28 12:42:07 +01:00
2023-10-08 02:43:19 +02:00
2023-10-08 02:43:19 +02:00
2023-11-07 15:00:38 -05:00
2023-08-17 15:26:34 -04:00
2023-09-12 22:51:48 +02:00
2024-01-05 10:42:10 +00:00
2023-01-12 13:42:44 +00:00
2023-06-16 10:38:19 +01:00
2022-12-24 23:49:50 +00:00
2023-12-15 15:21:22 +01:00
2023-11-28 12:42:07 +01:00
2023-12-15 15:20:54 +01:00
2023-07-19 18:12:42 +02:00
2023-11-30 11:27:54 +01:00
2023-02-17 11:42:41 +01:00
2023-10-26 15:02:13 -04:00
2023-04-19 10:48:30 +02:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2023-11-07 10:21:51 +09:00
2023-08-17 23:58:47 -05:00
2023-09-05 11:37:35 +01:00
2023-08-01 15:27:33 +02:00
2023-12-17 21:13:44 +01:00
2023-12-19 17:12:45 +01:00
2023-12-08 13:14:46 +00:00
2023-12-08 13:14:46 +00:00
2023-12-07 11:06:01 +01:00
2022-12-10 14:34:44 -06:00
2023-06-28 15:12:12 -04:00
2023-11-16 11:36:22 +10:00
2023-12-17 21:13:44 +01:00
2023-11-30 14:28:46 -05:00
2023-11-22 11:48:21 +01:00
2024-01-02 12:40:11 +01:00
2023-01-03 19:31:29 -06:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-05-20 12:08:13 +02:00