mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 22:57:56 +02:00
c6ca2b85a3validation: do not wipe utxo cache for stats/scans/snapshots (Pieter Wuille)7099e93d0arefactor: rename `FlushStateMode::ALWAYS` to `FORCE_FLUSH` (Lőrinc) Pull request description: Revival of https://github.com/bitcoin/bitcoin/pull/30610#issuecomment-3432564955 with the remaining comments applied on top > Since #28280, the cost of a non-wiping sync of the UTXO cache is only proportional to the number of dirty entries, rather than proportional to the size of the entire cache. Because of that, there is no reason to perform a wiping flush in case the contents of the cache is still useful. > > Split the `FlushStateMode::ALWAYS` mode into a FORCE_SYNC (non-wiping) and a FORCE_FLUSH (wiping), and then use the former in `scantxoutset`, `gettxoutsetinfo`, snapshot creation. (slightly updated after #30214) ACKs for top commit: optout21: reACKc6ca2b85a3cedwies: reACKc6ca2b8(trivial) achow101: ACKc6ca2b85a3sedited: ACKc6ca2b85a3Tree-SHA512: f3525a85dc512db4a0a9c749ad47c0d3fa44085a121aa54cd77646260a719c71f754ec6570ae77779c0ed68a24799116f79c686e7a17ce57a26f6a598f7bf926