diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-04-15 16:36:39 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-04-15 16:43:21 +0200 |
| commit | 9e47fcec1798e1db9a32ae243605e8245ffdb273 (patch) | |
| tree | 233e8ae0b6d19e5e42b791b26bbc43c514f430c7 /src/coins.cpp | |
| parent | Merge #7518: Add multiple options to fundrawtransaction (diff) | |
| parent | txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (diff) | |
| download | discoin-9e47fcec1798e1db9a32ae243605e8245ffdb273.tar.xz discoin-9e47fcec1798e1db9a32ae243605e8245ffdb273.zip | |
Merge #7756: Add cursor to iterate over utxo set, use this in `gettxoutsetinfo`
509cb00 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (Wladimir J. van der Laan)
Diffstat (limited to 'src/coins.cpp')
| -rw-r--r-- | src/coins.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/coins.cpp b/src/coins.cpp index 877fb8b26..1c329740b 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -45,7 +45,7 @@ bool CCoinsView::GetCoins(const uint256 &txid, CCoins &coins) const { return fal bool CCoinsView::HaveCoins(const uint256 &txid) const { return false; } uint256 CCoinsView::GetBestBlock() const { return uint256(); } bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; } -bool CCoinsView::GetStats(CCoinsStats &stats) const { return false; } +CCoinsViewCursor *CCoinsView::Cursor() const { return 0; } CCoinsViewBacked::CCoinsViewBacked(CCoinsView *viewIn) : base(viewIn) { } @@ -54,7 +54,7 @@ bool CCoinsViewBacked::HaveCoins(const uint256 &txid) const { return base->HaveC uint256 CCoinsViewBacked::GetBestBlock() const { return base->GetBestBlock(); } void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; } bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); } -bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStats(stats); } +CCoinsViewCursor *CCoinsViewBacked::Cursor() const { return base->Cursor(); } CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {} @@ -300,3 +300,7 @@ CCoinsModifier::~CCoinsModifier() cache.cachedCoinsUsage += it->second.coins.DynamicMemoryUsage(); } } + +CCoinsViewCursor::~CCoinsViewCursor() +{ +} |