From 3565f70df98a335bffbd31a9f1a29474f21d0ed0 Mon Sep 17 00:00:00 2001 From: ChrisCho-H Date: Sat, 12 Oct 2024 12:42:43 +0900 Subject: [PATCH] feat: replace ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF --- bitcoin/examples/ecdsa-psbt-simple.rs | 2 +- bitcoin/examples/sign-tx-segwit-v0.rs | 2 +- bitcoin/examples/sign-tx-taproot.rs | 2 +- bitcoin/examples/taproot-psbt-simple.rs | 2 +- primitives/src/sequence.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bitcoin/examples/ecdsa-psbt-simple.rs b/bitcoin/examples/ecdsa-psbt-simple.rs index d801cff37..10bd5aea5 100644 --- a/bitcoin/examples/ecdsa-psbt-simple.rs +++ b/bitcoin/examples/ecdsa-psbt-simple.rs @@ -155,7 +155,7 @@ fn main() { .map(|(outpoint, _)| TxIn { previous_output: outpoint, script_sig: ScriptBuf::default(), - sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, + sequence: Sequence::ENABLE_LOCKTIME_AND_RBF, witness: Witness::default(), }) .collect(); diff --git a/bitcoin/examples/sign-tx-segwit-v0.rs b/bitcoin/examples/sign-tx-segwit-v0.rs index 997104d66..821921ded 100644 --- a/bitcoin/examples/sign-tx-segwit-v0.rs +++ b/bitcoin/examples/sign-tx-segwit-v0.rs @@ -33,7 +33,7 @@ fn main() { let input = TxIn { previous_output: dummy_out_point, // The dummy output we are spending. script_sig: ScriptBuf::default(), // For a p2wpkh script_sig is empty. - sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, + sequence: Sequence::ENABLE_LOCKTIME_AND_RBF, witness: Witness::default(), // Filled in after signing. }; diff --git a/bitcoin/examples/sign-tx-taproot.rs b/bitcoin/examples/sign-tx-taproot.rs index c56f5e912..36c56909c 100644 --- a/bitcoin/examples/sign-tx-taproot.rs +++ b/bitcoin/examples/sign-tx-taproot.rs @@ -34,7 +34,7 @@ fn main() { let input = TxIn { previous_output: dummy_out_point, // The dummy output we are spending. script_sig: ScriptBuf::default(), // For a p2tr script_sig is empty. - sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, + sequence: Sequence::ENABLE_LOCKTIME_AND_RBF, witness: Witness::default(), // Filled in after signing. }; diff --git a/bitcoin/examples/taproot-psbt-simple.rs b/bitcoin/examples/taproot-psbt-simple.rs index 23828b566..b98aba868 100644 --- a/bitcoin/examples/taproot-psbt-simple.rs +++ b/bitcoin/examples/taproot-psbt-simple.rs @@ -175,7 +175,7 @@ fn main() { .map(|(outpoint, _)| TxIn { previous_output: outpoint, script_sig: ScriptBuf::default(), - sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, + sequence: Sequence::ENABLE_LOCKTIME_AND_RBF, witness: Witness::default(), }) .collect(); diff --git a/primitives/src/sequence.rs b/primitives/src/sequence.rs index f67c5ea3f..f6f66e890 100644 --- a/primitives/src/sequence.rs +++ b/primitives/src/sequence.rs @@ -282,7 +282,7 @@ impl<'a> Arbitrary<'a> for Sequence { 0 => Ok(Sequence::MAX), 1 => Ok(Sequence::ZERO), 2 => Ok(Sequence::MIN_NO_RBF), - 3 => Ok(Sequence::ENABLE_RBF_NO_LOCKTIME), + 3 => Ok(Sequence::ENABLE_LOCKTIME_AND_RBF), _ => Ok(Sequence(u.arbitrary()?)), } }