Skip to content

Conversation

@JoseSK999
Copy link
Contributor

What is the purpose of this pull request?

  • Bug fix
  • Documentation update
  • New feature
  • Test
  • Other:

Which crates are being modified?

  • floresta-chain
  • floresta-cli
  • floresta-common
  • floresta-compact-filters
  • floresta-electrum
  • floresta-watch-only
  • floresta-wire
  • floresta
  • florestad
  • Other: .

Description

This adds two historical cases:

  • A coinbase output spent at n + 101 (see the tx and the outspend heights)
  • A coinbase output spent at n + 100 (see the tx and the outspend heights)

Then we tweak the height for the last case to test the negative case, failing if spent at n + 99 (not matured).

And a nit: Aligned better the TX_VALIDATION_CASES_LEGACY array, adding a tab.

Notes to the reviewers

Test follow up for #440.

Fun fact: I couldn't find coinbase coins spent in the minimum block allowed (n + 100) anywhere online. I had to traverse the whole first 228k blocks to find the first historical examples of these spends.

This adds two historical cases:
- A coinbase output spent at `n + 101`
- A coinbase output spent at `n + 100`

Then we tweak the height for the last case to test the negative case, failing if spent at `n + 99` (not matured).

And a nit: Aligned better the `TX_VALIDATION_CASES_LEGACY` array, adding a tab.
@Davidson-Souza Davidson-Souza added code quality Generally improves code readability and maintainability consensus This changes something inside our consensus implementation labels Apr 24, 2025
Copy link
Member

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c055eb0

@Davidson-Souza Davidson-Souza merged commit 564c587 into vinteumorg:master Apr 28, 2025
8 checks passed
Davidson-Souza added a commit to Davidson-Souza/Floresta that referenced this pull request Apr 28, 2025
\vinteumorg#457 introduced a change that broke a new lint for string
interpolation. For some reason, it didn't break on the PR itself, but
did break after merge. This commit fixes it and should get CI green
again.
Davidson-Souza added a commit that referenced this pull request Apr 28, 2025
#457 introduced a change that broke a new lint for string
interpolation. For some reason, it didn't break on the PR itself, but
did break after merge. This commit fixes it and should get CI green
again.
@JoseSK999 JoseSK999 deleted the coinbase-maturity-tests branch April 30, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Generally improves code readability and maintainability consensus This changes something inside our consensus implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants