0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-15 11:36:00 -05:00
bitcoin-bitcoin-core/src/kernel
Ryan Ofsky b1ba1b178f
Merge bitcoin/bitcoin#30132: indexes: Don't wipe indexes again when continuing a prior reindex
f68cba29b3 blockman: Replace m_reindexing with m_blockfiles_indexed (Ryan Ofsky)
1b1c6dcca0 test: Add functional test for continuing a reindex (TheCharlatan)
201c1a9282 indexes: Don't wipe indexes again when already reindexing (TheCharlatan)
804f09dfa1 kernel: Add less confusing reindex options (Ryan Ofsky)
e172553223 validation: Remove needs_init from LoadBlockIndex (TheCharlatan)
533eab7d67 bugfix: Streamline setting reindex option (TheCharlatan)

Pull request description:

  When restarting `bitcoind` during an ongoing reindex without setting the `-reindex` flag again, the block and coins db is left intact, but any data from the optional indexes is discarded. While not a bug per se, wiping the data again is
  wasteful, both in terms of having to write it again,  as well as potentially leading to longer startup times. So keep the  index data instead when continuing a prior reindex.

  Also includes a bugfix and smaller code cleanups around the reindexing code. The bug was introduced in b47bd95920: "kernel: De-globalize fReindex".

ACKs for top commit:
  stickies-v:
    ACK f68cba29b3
  fjahr:
    Code review ACK f68cba29b3
  furszy:
    Code review ACK f68cba29b3
  ryanofsky:
    Code review ACK f68cba29b3. Only changes since last review were cherry-picking suggested commits that rename variables, improving comments, and making some tweaks to test code.

Tree-SHA512: b252228cc76e9f1eaac56d5bd9e4eac23408e0fc04aeffd97a85417f046229364673ee1ca7410b9b6e7b692b03f13ece17c42a10176da0d7e975a8915deb98ca
2024-06-10 10:12:30 -04:00
..
bitcoinkernel.cpp b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp 2022-04-26 16:30:53 -04:00
blockmanager_opts.h kernel: Add less confusing reindex options 2024-06-07 19:17:11 +02:00
chain.cpp validation: add ChainstateRole 2023-09-30 06:38:47 -04:00
chain.h validation: add ChainstateRole 2023-09-30 06:38:47 -04:00
chainparams.cpp assumeutxo: Add network magic ctor param to SnapshotMetadata 2024-05-24 18:44:02 +02:00
chainparams.h assumeutxo: Add network magic ctor param to SnapshotMetadata 2024-05-24 18:44:02 +02:00
chainstatemanager_opts.h scripted-diff: Rename MainSignals to ValidationSignals 2024-02-15 14:45:51 +01:00
checks.cpp kernel: Remove key module from kernel library 2024-05-09 15:56:08 +02:00
checks.h fix includes for touched header files (iwyu) 2023-05-29 13:26:31 +02:00
coinstats.cpp scripted-diff: Replace error() with LogError() 2024-03-11 13:49:37 +01:00
coinstats.h coinstats: Fix hash_serialized2 calculation 2023-10-20 22:53:05 +02:00
context.cpp kernel: Remove key module from kernel library 2024-05-09 15:56:08 +02:00
context.h kernel: Remove key module from kernel library 2024-05-09 15:56:08 +02:00
cs_main.cpp kernel: add missing include 2023-02-22 15:46:21 +00:00
cs_main.h refactor: add kernel/cs_main.* 2023-01-05 09:05:14 +00:00
disconnected_transactions.cpp bugfix: correct DisconnectedBlockTransactions memory usage 2023-10-19 16:14:36 +01:00
disconnected_transactions.h bugfix: correct DisconnectedBlockTransactions memory usage 2023-10-19 16:14:36 +01:00
mempool_entry.h tx fees: update m_from_disconnected_block to m_mempool_limit_bypassed 2024-01-02 12:41:01 +01:00
mempool_limits.h refactor: mempool: add MemPoolLimits::NoLimits() 2022-10-05 13:07:11 +01:00
mempool_options.h scripted-diff: Rename MainSignals to ValidationSignals 2024-02-15 14:45:51 +01:00
mempool_persist.cpp refactor: Simply include CTxMemPool::Options in CTxMemPool directly rather than duplicating definition 2024-05-06 20:34:10 +00:00
mempool_persist.h Add importmempool RPC 2023-08-07 11:33:34 +02:00
mempool_removal_reason.cpp move-only: Create src/kernel/mempool_removal_reason.h 2023-08-17 16:26:20 +02:00
mempool_removal_reason.h move-only: Create src/kernel/mempool_removal_reason.h 2023-08-17 16:26:20 +02:00
messagestartchars.h kernel: Move MessageStartChars to its own file 2023-09-12 22:51:38 +02:00
notifications_interface.h node: Make translations of fatal errors consistent 2024-03-21 16:40:22 +01:00
validation_cache_sizes.h validationcaches: Use size_t for sizes 2022-08-03 12:03:28 -04:00