AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 19 Bitcoin

units: remove Amount::MAX_MONEY

Public commit record

What the developer wrote

Authored by satsfy (Renato Britto)

70/100 · Adequate
units: remove Amount::MAX_MONEY

We are hedging between looking like core and looking
rustonic on the Amount::MAX and Amount::MAX_MONEY. I think
we should just kill MAX_MONEY because:
1. DRY principle
2. Why are we afraid of looking different from core?
3. We can remove now and add later, but not easily later.
4. We have Weight::MAX, Sequence::MAX...
5. It just looks bad

This commit also makes `MAX_MONEY` only a doc alias to `MAX`
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This is a routine code cleanup in the rust-bitcoin library. It removes a duplicate constant named MAX_MONEY and replaces all uses with an existing identical constant named MAX. The actual numeric limit (21 million bitcoin) and all safety checks stay exactly the same. There is no security bug being fixed here.

Recommended action

No action required. Treat as a normal API refactor. If you depend on Amount::MAX_MONEY, update to Amount::MAX; the old name remains a documentation alias only.

Security signals we found

01

No security signal: pure API cleanup with identical semantics

02

No change to validation logic or numeric limits

03

No memory-safety, cryptographic, or consensus-relevant change

Risk score

Why this scored 19/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 5/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.