Skip to content

[draft] CCoinsView interface separation#6

Draft
optout21 wants to merge 4 commits into
masterfrom
2604-coins-view-interface
Draft

[draft] CCoinsView interface separation#6
optout21 wants to merge 4 commits into
masterfrom
2604-coins-view-interface

Conversation

@optout21

@optout21 optout21 commented Apr 29, 2026

Copy link
Copy Markdown
Owner

EXPERIMENTAL

Separation of CCoinsView interface into readonly and write parts.

  • Split CCoinsView into ...ReadOnly, ...ReadCacheMutable, and ...Write, built on top of each other. Note: the Read version may not be useful/needed in itself.
  • In most places, the ...Write version is used, but in some places usage can be restricted to non-writeable interface. Non-write usages: ComputeUTXOStats, RPC rest_getutxos, GetUTXOStats, CalculatePrevHeights, CalculateLockPointsAtTip, VerifyDB.
  • Split CCoinsViewBacked into ...ReadCacheMutable and ...Write (ReadOnly is not required). For now use the ...Write version -- ...ReadCacheMutable could be used in a few places, like the ErrorCatcher and Mempool, but they are sometimes used as a backend for Cached, which requires Write.
  • Carve out non-write CCoinsViewCacheRead from CCoinsViewCache

References
Coins Cache Cleanup checklist 34280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant