mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 13397dc78f into merged_master (Bitcoin PR #19056)
This commit is contained in:
commit
cac993d7e9
5 changed files with 18 additions and 9 deletions
|
|
@ -37,7 +37,7 @@ static void ApplyStats(CCoinsStats &stats, CHashWriter& ss, const uint256& hash,
|
|||
}
|
||||
|
||||
//! Calculate statistics about the unspent transaction output set
|
||||
bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats)
|
||||
bool GetUTXOStats(CCoinsView* view, CCoinsStats& stats, const std::function<void()>& interruption_point)
|
||||
{
|
||||
stats = CCoinsStats();
|
||||
std::unique_ptr<CCoinsViewCursor> pcursor(view->Cursor());
|
||||
|
|
@ -53,6 +53,7 @@ bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats)
|
|||
uint256 prevkey;
|
||||
std::map<uint32_t, Coin> outputs;
|
||||
while (pcursor->Valid()) {
|
||||
interruption_point();
|
||||
COutPoint key;
|
||||
Coin coin;
|
||||
if (pcursor->GetKey(key) && pcursor->GetValue(coin)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue