Skip to content

Commit

Permalink
chore(wallet): rename rbf to sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
luisschwab committed Sep 27, 2024
1 parent 8910189 commit 668bb82
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions crates/wallet/src/wallet/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,20 @@ impl After {
}
}

/// look into this in parallel with n_sequence match statement
pub(crate) fn check_nsequence_rbf(rbf: Sequence, csv: Sequence) -> bool {
// The RBF value must enable relative timelocks
if !rbf.is_relative_lock_time() {
pub(crate) fn check_nsequence_rbf(sequence: Sequence, csv: Sequence) -> bool {
// The nSequence value must enable relative timelocks
if !sequence.is_relative_lock_time() {
return false;
}

// Both values should be represented in the same unit (either time-based or
// block-height based)
if rbf.is_time_locked() != csv.is_time_locked() {
if sequence.is_time_locked() != csv.is_time_locked() {
return false;
}

// The value should be at least `csv`
if rbf < csv {
if sequence < csv {
return false;
}

Expand Down

0 comments on commit 668bb82

Please sign in to comment.