Ava Chow
128b4a8038
Merge bitcoin/bitcoin#29403 : wallet: batch erase procedures and improve 'EraseRecords' performance
...
77331aa2a198b708372a5c6cdf331faf7e2968ef wallet: simplify EraseRecords by using 'ErasePrefix' (furszy)
33757814ceb04102141d3fd5ef2f87abf0422310 wallet: bdb batch 'ErasePrefix', do not create txn internally (furszy)
cf4d72a75e9603e947b3d47e1f3ac7c7f37bb401 wallet: db, introduce 'RunWithinTxn()' helper function (furszy)
Pull request description:
Seeks to optimize and simplify `WalletBatch::EraseRecords`. Currently, this process opens a cursor to iterate over the entire database, searching for records that match the type prefixes, to then call the `WalletBatch::Erase` function for each of the matching records.
This PR rewrites this 40-line manual process into a single line; instead of performing all of those actions manually, we can simply utilize the `ErasePrefix()` functionality. The result is 06216b344dea6ad6c385fda0b37808ff9ae5273b.
Moreover, it expands the test coverage for the `ErasePrefix` functionality and documents the db txn requirement for `BerkeleyBatch::ErasePrefix` .
ACKs for top commit:
achow101:
reACK 77331aa2a198b708372a5c6cdf331faf7e2968ef
josibake:
code review ACK 77331aa2a1
Tree-SHA512: 9f78dda658677ff19b5979ba0efd11cf9fabf3d315feb79ed1160526f010fe843c41903fc18c0b092f78aa88bc874cf24edad8fc1ea6e96aabdc4fd1daf21ca5
2024-02-13 13:08:30 -05:00
..
2024-01-02 11:12:32 -05:00
2024-01-23 21:01:32 -03:00
2023-10-04 11:11:37 +02:00
2023-11-16 11:36:22 +10:00
2024-01-26 18:56:41 -05:00
2023-12-04 15:39:15 -04:00
2024-01-11 11:01:28 -06:00
2024-01-05 10:42:10 +00:00
2023-11-28 12:35:50 -05:00
2024-02-05 14:21:10 +00:00
2023-01-31 18:48:50 +01:00
2024-02-01 13:52:05 +01:00
2024-02-12 14:27:25 +00:00
2023-11-28 08:44:41 -05:00
2024-02-12 18:18:21 +00:00
2024-02-09 23:37:57 -05: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-02-13 11:47:10 -03:00
2023-07-27 14:24:52 +02:00
2024-01-05 11:22:31 +01:00
2024-02-12 16:06:13 -03: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
2024-02-08 13:49:15 -05:00
2024-01-15 16:19:53 -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
2023-09-10 16:11:52 -04:00
2023-09-10 16:11:52 -04:00
2024-01-05 17:16:38 +00:00
2024-01-09 15:27:08 -06: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
2024-02-01 13:52:05 +01: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
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
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
2024-01-05 17:12:38 +01:00
2023-11-16 11:36:22 +10:00
2024-02-01 13:52:05 +01:00
2023-09-19 15:54:17 -06:00
2024-01-10 14:11:32 -05:00
2023-12-04 15:39:15 -04:00
2024-01-07 16:24:08 -06:00
2023-10-05 14:11:13 +02:00
2024-01-31 15:58:47 -05:00
2023-12-04 15:39:15 -04:00
2024-01-16 15:29:18 +01:00
2023-08-14 17:38:27 -04:00
2024-01-16 15:29:18 +01:00
2024-01-16 15:29:18 +01:00
2023-12-15 11:03:25 +10:00
2023-12-20 15:59:48 +10:00
2024-02-09 23:37:57 -05:00
2024-01-02 11:12:32 -05:00
2024-02-07 09:23:42 +00: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
2024-02-03 17:59:43 +01: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
2024-02-01 13:52:05 +01:00
2024-01-15 10:28:20 -03:00
2023-05-30 16:27:21 -03:00
2024-01-31 11:44:41 -05:00
2024-01-31 15:33:57 -05:00
2023-07-19 12:43:05 -06:00
2024-01-23 11:49:32 +01: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
2023-08-14 17:38:27 -04:00
2023-08-14 17:38:27 -04:00
2024-01-18 19:29:34 +01:00
2024-01-23 10:25:16 -03:00
2024-01-23 10:25:16 -03: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
2024-01-16 10:58:57 +01: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-06-16 10:38:19 +01:00
2023-12-22 09:58:18 +01:00
2023-11-28 12:42:07 +01:00
2023-12-22 09:58:19 +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
2024-01-05 17:16:38 +00:00
2024-02-01 13:52:05 +01:00
2023-01-31 11:50:10 +00:00
2024-01-10 14:11:32 -05: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
2024-02-09 23:37:57 -05:00
2024-02-09 23:37:57 -05: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
2023-06-28 15:12:12 -04:00
2023-11-16 11:36:22 +10:00
2024-02-09 23:37:57 -05:00
2024-01-05 17:16:38 +00:00
2023-11-22 11:48:21 +01:00
2024-01-02 12:40:11 +01:00
2023-05-20 12:08:13 +02:00