HomePhabricator

refactor: disallow setting flags in CCoinsCacheEntry constructors

Description

refactor: disallow setting flags in CCoinsCacheEntry constructors

Summary:
No behavior change because any entries that are added in EmplaceCoinInternalDANGER
have DIRTY assigned to them after, and if they are not inserted then they will not be
modified as before.

Move flags to private and rename to m_flags.
No behavior change. This prepares to add CCoinsCacheEntrys
to a doubly linked list when a flag is added.

Co-Authored-By: Martin Leitner-Ankerl <martin.ankerl@gmail.com>

This is a partial backport of core#28280
https://github.com/bitcoin/bitcoin/pull/28280/commits/4e4fb4cbabcc10e723534f5f80f3e3cf09f6ca50
https://github.com/bitcoin/bitcoin/pull/28280/commits/f08faeade2f99ae1de6f3c481697541cc16186c7
Depends on D18604

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Andrew Toth <andrewstoth@gmail.com>Authored on Jun 28 2024, 20:41
PiRKCommitted on Sep 12 2025, 19:21
PiRKPushed on Sep 12 2025, 19:21
Reviewer
Restricted Project
Differential Revision
D18605: refactor: disallow setting flags in CCoinsCacheEntry constructors
Parents
rABC291722dd5877: refactor: encapsulate CCoinsCacheEntry flags access
Branches
Unknown
Tags
Unknown