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