![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
Abstract view on the open txout dataset. More...
#include <coins.h>
Public Member Functions | |
| virtual std::optional< Coin > | GetCoin (const COutPoint &outpoint) const |
| Retrieve the Coin (unspent transaction output) for a given outpoint. | |
| virtual std::optional< Coin > | PeekCoin (const COutPoint &outpoint) const |
| Retrieve the Coin (unspent transaction output) for a given outpoint, without caching results. | |
| virtual bool | HaveCoin (const COutPoint &outpoint) const |
| Just check whether a given outpoint is unspent. | |
| virtual uint256 | GetBestBlock () const |
| Retrieve the block hash whose state this CCoinsView currently represents. | |
| virtual std::vector< uint256 > | GetHeadBlocks () const |
| Retrieve the range of blocks that may have been only partially written. | |
| virtual void | BatchWrite (CoinsViewCacheCursor &cursor, const uint256 &hashBlock) |
| Do a bulk modification (multiple Coin changes + BestBlock change). | |
| virtual std::unique_ptr< CCoinsViewCursor > | Cursor () const |
| Get a cursor to iterate over the whole state. | |
| virtual | ~CCoinsView ()=default |
| As we use CCoinsViews polymorphically, have a virtual destructor. | |
| virtual size_t | EstimateSize () const |
| Estimate database size (0 if not implemented) | |
|
virtualdefault |
As we use CCoinsViews polymorphically, have a virtual destructor.
|
virtual |
Do a bulk modification (multiple Coin changes + BestBlock change).
The passed cursor is used to iterate through the coins.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, and CCoinsViewDB.
Definition at line 21 of file coins.cpp.
|
virtual |
Get a cursor to iterate over the whole state.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, and CCoinsViewDB.
Definition at line 26 of file coins.cpp.
Estimate database size (0 if not implemented)
Reimplemented in CCoinsViewBacked, and CCoinsViewDB.
Definition at line 342 of file coins.h.
|
virtual |
Retrieve the block hash whose state this CCoinsView currently represents.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, and CCoinsViewDB.
Definition at line 19 of file coins.cpp.
Retrieve the Coin (unspent transaction output) for a given outpoint.
May populate the cache. Use PeekCoin() to perform a non-caching lookup.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, CCoinsViewErrorCatcher, CCoinsViewDB, and CCoinsViewMemPool.
Definition at line 17 of file coins.cpp.
|
virtual |
Retrieve the range of blocks that may have been only partially written.
If the database is in a consistent state, the result is the empty vector. Otherwise, a two-element vector is returned consisting of the new and the old block hash, in that order.
Reimplemented in CCoinsViewBacked, and CCoinsViewDB.
Definition at line 20 of file coins.cpp.
Just check whether a given outpoint is unspent.
May populate the cache. Use PeekCoin() to perform a non-caching lookup.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, CCoinsViewErrorCatcher, and CCoinsViewDB.
Definition at line 28 of file coins.cpp.
Retrieve the Coin (unspent transaction output) for a given outpoint, without caching results.
Does not populate the cache. Use GetCoin() to cache the result.
Reimplemented in CCoinsViewBacked, CCoinsViewCache, and CCoinsViewErrorCatcher.
Definition at line 18 of file coins.cpp.