HomePhabricator

Don't return stale data from CCoinsViewCache::Cursor()

Description

Don't return stale data from CCoinsViewCache::Cursor()

Summary:
CCoinsViewCache doesn't actually support cursor iteration returning the
current contents of the cache, so raise an error when the cursor method is
called instead of returning a cursor that iterates over stale data.

Also update the gettxoutsetinfo RPC which was relying on the old behavior to be
explicit about which view it is returning data about.

This is a backport of Core PR10550

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1906

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Jun 7 2017, 17:00
deadalnixCommitted on Oct 9 2018, 19:27
deadalnixPushed on Oct 9 2018, 19:38
Reviewer
Restricted Project
Differential Revision
D1906: Don't return stale data from CCoinsViewCache::Cursor()
Parents
rSTAGINGb6470ce2ad17: Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if…
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/5357, tag: phabricator/base/5356