Skip to content

Conversation

hodlinator
Copy link
Contributor

Follow-up to #30906 which made it possible by removing external usage of the enum.

Move-only change, reviewable using:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 13, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31496.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@l0rinc
Copy link
Contributor

l0rinc commented Dec 13, 2024

We want to completely remove the flags in the future since we're storing it redundantly (cc @andrewtoth), so this move is a nack from me.

@andrewtoth
Copy link
Contributor

andrewtoth commented Dec 13, 2024

As @l0rinc alluded, we don't really need flags at all anymore. A dirty entry is one that is spent or is FRESH. So, we only really need a binary state now, not a bitfield, so we can replace flags with an m_fresh boolean. IsDirty() can return coin.IsSpent() || m_fresh.

@hodlinator
Copy link
Contributor Author

Ookay.. closing suggested follow-up PR due to unexpected welcome. 🙃

@hodlinator hodlinator closed this Dec 13, 2024
@andrewtoth
Copy link
Contributor

Well, what about a PR with that approach to remove the flags bitfield and replace with a boolean for fresh only?

@hodlinator
Copy link
Contributor Author

Well, what about a PR with that approach to remove the flags bitfield and replace with a boolean for fresh only?

I'd prefer someone else more knowledgeable/active in this area take the initiative on such a transform.

@l0rinc
Copy link
Contributor

l0rinc commented Dec 14, 2024

I'd prefer someone else more knowledgeable/active in this area take the initiative on such a transform.

We can help with the reviews - or even with describing the problem in more detail, but removing the flags (as described by @andrewtoth above) would be a lot more meaningful than just moving the flags.

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

Successfully merging this pull request may close these issues.

4 participants