Andrew Toth
2ee7f9b259
coins: assume GetCoin only returns unspent coins
...
`CCoinsViewCache::FetchCoin()` had special handling for a spent `Coin` returned by the parent view.
Production parents (`CCoinsViewCache` and `CCoinsViewDB`) do not return spent coins, so this path is unreachable.
Replace it with an `Assume(!coin.IsSpent())`, drop outdated documentation about spent+FRESH cache entries, and simplify `SanityCheck()` to assert the remaining possible state invariants.
This is safe because it does not change behavior for valid backends and will fail fast if the `GetCoin()` contract is violated.
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
2026-01-11 21:32:52 +01:00
..
2026-01-05 15:47:49 -08:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-22 17:38:50 +00:00
2025-12-27 16:18:34 +00:00
2025-12-16 22:21:15 +01:00
2025-12-21 10:24:36 +01:00
2025-12-16 22:21:15 +01:00
2025-12-27 16:20:43 +00:00
2025-12-16 22:21:15 +01:00
2026-01-05 17:59:53 +01:00
2025-12-29 21:26:35 +01:00
2025-12-19 16:56:02 +00:00
2025-12-24 11:09:15 -08:00
2026-01-04 02:02:01 +01:00
2026-01-02 16:15:50 -08:00
2025-12-16 22:21:15 +01:00
2026-01-06 12:16:46 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2026-01-02 16:15:50 -08:00
2025-12-16 22:21:15 +01:00
2025-12-17 20:29:36 +00:00
2025-12-18 22:38:02 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-18 16:07:31 +01:00
2025-12-17 16:17:29 -05:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-11-13 09:33:36 +01:00
2025-12-16 22:21:15 +01:00
2025-12-30 12:12:26 -08:00
2025-12-17 20:29:03 +00:00
2026-01-11 21:32:52 +01:00
2026-01-11 21:32:52 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-21 10:24:09 +01:00
2025-12-16 22:21:15 +01:00
2025-12-12 06:49:59 -04:00
2025-12-12 06:49:59 -04:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-13 12:48:27 +01:00
2025-12-16 22:21:15 +01:00
2025-12-13 13:43:24 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-17 16:17:29 -05:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-17 18:35:49 +01:00
2025-12-17 18:35:49 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-11-24 18:48:43 +01:00
2025-11-24 18:48:43 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-01-06 09:45:34 +00:00
2025-12-06 13:06:21 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-17 16:17:29 -05:00
2025-12-10 06:51:47 +10:00
2025-11-03 14:39:48 +01:00
2025-12-11 09:00:18 -08:00
2025-12-03 13:36:58 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-11-03 14:39:50 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-03 13:36:58 +01:00
2026-01-05 14:56:25 -08:00
2025-11-03 14:39:48 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-14 10:04:37 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-10-30 17:51:53 +01:00
2025-12-21 10:24:09 +01:00
2025-12-21 10:24:09 +01:00
2025-11-14 01:17:38 +02:00
2025-11-14 01:17:38 +02:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2026-01-06 12:16:45 +01:00
2026-01-02 16:49:23 -08:00
2025-12-30 12:12:26 -08:00
2025-11-25 07:36:50 -05:00
2025-12-18 22:38:02 +01:00
2025-12-19 16:56:02 +00:00
2025-12-18 22:38:02 +01:00
2025-12-30 12:12:26 -08:00
2025-12-16 22:21:15 +01:00
2025-11-03 14:39:48 +01:00
2025-12-16 22:21:15 +01:00
2026-01-02 16:49:23 -08:00
2025-12-16 11:25:46 -05:00
2025-12-16 22:21:15 +01:00
2025-12-12 06:49:59 -04:00
2025-12-16 22:21:15 +01:00
2025-12-19 16:56:02 +00:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00