Not exactly what I meant, I don’t think that’s ever called.
My objection was rather that the cache hierarchies have to stop somewhere and we’re currently doing that by adding dummy values at the bottom, e.g.
0CCoinsView viewDummy;
1CCoinsViewCache view(&viewDummy);
But the base field is a pointer, which makes sense, the recursion has to stop somewhere.
https://github.com/bitcoin/bitcoin/blob/dfde31f2ec1f90976f3ba6b06f2b38a1307c01ab/src/coins.h#L344
But instead of a nullptr, we’re storing an half-initialized CCoinsView instance which will always return nonsensical values.
So now we have two problems, a dummy sentinel and a nullptr both signal the end of recursion.
We also have a CCoinsViewBacked which just delegates to the backing cache - except we’re not actually checking for nullptr in most places?
https://github.com/bitcoin/bitcoin/blob/dfde31f2ec1f90976f3ba6b06f2b38a1307c01ab/src/coins.cpp#L51
What’s the role of CCoinsViewBacked and CCoinsViewErrorCatcher and the dummy implementation of CCoinsView exactly?
We should likely clean this up in a follow-up, but it could help to clarify how the CCoinsView implementations should look like in this one.