Skip to content

Conversation

aagbotemi
Copy link

Description

This PR implements Anti-Fee-Sniping with randomization as discussed in issue #47.

Notes to the reviewers

The implementation adds randomization to anti-fee-sniping behavior:

  1. Uses a 50/50 chance to choose between nLockTime and nSequence (when possible)
  2. Adds a 10% chance to set either value further back in time (by a random value between 0-99)
  3. Detects taproot inputs and their confirmation status

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Closes #47

@coveralls
Copy link

coveralls commented Apr 26, 2025

Pull Request Test Coverage Report for Build 14684778812

Details

  • 191 of 240 (79.58%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 86.333%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/wallet/tx_builder.rs 191 240 79.58%
Totals Coverage Status
Change from base Build 14270666930: -0.2%
Covered Lines: 7460
Relevant Lines: 8641

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

Randomize anti-fee sniping height
3 participants