Added some admittedly trivial tests to protect against unintended and breaking modifications of the respective contracts.
Remark: AFAIK the only specialization in production code of CCoinsView is CCoinsViewDB On the other hand, there are several parts in the production code where a DUMMY instance of CCoinsView is instantiated only to comply with the signature of the class CCoinsViewCache.
IMHO this smells like overengineering (aka: the future never comes) or forced code recycling and could potentially lead to unintended behavior along the road.
Will invest some time to take a deeper look into this.
e.g.
./bitcoin/src/rpc/rawtransaction.cpp: CCoinsView viewDummy;
./bitcoin/src/rpc/rawtransaction.cpp: CCoinsViewCache view(&viewDummy);
./bitcoin/src/bitcoin-tx.cpp: CCoinsView viewDummy;
./bitcoin/src/bitcoin-tx.cpp: CCoinsViewCache view(&viewDummy);
./bitcoin/src/validation.cpp: CCoinsView dummy;
./bitcoin/src/validation.cpp: CCoinsViewCache view(&dummy);
./bitcoin/src/bench/ccoins_caching.cpp: CCoinsView coinsDummy;
./bitcoin/src/bench/ccoins_caching.cpp: CCoinsViewCache coins(&coinsDummy);