mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user