coins: make CCoinsView methods pure virtual

`CCoinsView` provided default no-op implementations, which allowed constructing a bare view and silently getting dummy behavior.
Make all interface methods pure virtual and remove the legacy default definitions from `coins.cpp` so callers must choose an explicit implementation.
Move the virtual destructor to the beginning to avoid mixing it between the methods.
No-op backing behavior remains available via `CoinsViewEmpty`.
This commit is contained in:
Lőrinc
2026-02-20 14:19:58 +01:00
parent b637566c8d
commit 86296f276d
6 changed files with 34 additions and 32 deletions

View File

@@ -247,7 +247,7 @@ FUZZ_TARGET(coinscache_sim)
CallOneOf(
provider,
[&]() { // GetCoin
[&]() { // PeekCoin/GetCoin
uint32_t outpointidx = provider.ConsumeIntegralInRange<uint32_t>(0, NUM_OUTPOINTS - 1);
// Look up in simulation data.
auto sim = lookup(outpointidx);