mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 14:13:52 +02:00
72db4accbfcoins: drop stale cursor null checks (Lőrinc)3d2f2d8de0coins: pass UTXO stats view by reference (Lőrinc)35aedb2823coins: drop cursor from base view (Lőrinc)c6fbe2f66ccoins: pass DB view to cursor users (Lőrinc) Pull request description: **Problem:** `CCoinsView::Cursor()` makes cursor iteration look like a generic coins view operation, but cursor iteration is only supported by the DB-backed coins view. The cache override only threw, and the `coins_view` fuzz target only asserted that deterministic unsupported throw path. **Fix:** Make cursor iteration a `CCoinsViewDB` operation. Cursor users now take the DB-backed view directly, `CCoinsView` no longer exposes `Cursor()`, and the fuzz target keeps DB-backed cursor coverage while dropping the unsupported cache throw probe. The UTXO stats path is also tightened to pass the non-null DB view by reference, and stale null handling for DB cursors is removed. This was extracted from review discussion in https://github.com/bitcoin/bitcoin/pull/35295#discussion_r3420576781 and extended based on https://github.com/bitcoin/bitcoin/pull/35562#issuecomment-4746585893. ACKs for top commit: achow101: ACK72db4accbfsedited: Re-ACK72db4accbfw0xlt: ACK72db4accbfandrewtoth: ACK72db4accbfTree-SHA512: 12a81330a6ec1b91a7e4393f3761ea9ed4702ecb24312f1defa5a9a079a396ce921fc52f74fe296e5ac7ab20d5b5a8a84e858c96847f333c58b7fa9de9e8143e