coins, refactor: Make AddFlags, SetDirty, SetFresh static
Summary:
This makes the Assume(&self.second == this) check redundant
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This is a partial backport of core#30906
https://github.com/bitcoin/bitcoin/pull/30906/commits/fc8c282022e6ce4eb3ce526800a6ada3b4a2996d
Depends on D18806
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18807