|
1 | 1 | use crate::bitcoin::{OutPoint, PartiallySignedTransaction, Transaction}; |
2 | 2 | use crate::descriptor::Descriptor; |
3 | | -use crate::types::{Balance, RbfValue}; |
4 | 3 | use crate::types::ScriptAmount; |
| 4 | +use crate::types::{Balance, RbfValue}; |
5 | 5 | use crate::Script; |
6 | 6 | use crate::{AddressIndex, AddressInfo, Network}; |
7 | 7 |
|
8 | 8 | use bdk::bitcoin::blockdata::script::ScriptBuf as BdkScriptBuf; |
9 | 9 | use bdk::bitcoin::{OutPoint as BdkOutPoint, Sequence}; |
| 10 | +use bdk::wallet::tx_builder::ChangeSpendPolicy; |
10 | 11 | use bdk::wallet::Update as BdkUpdate; |
11 | 12 | use bdk::{Error as BdkError, FeeRate}; |
12 | 13 | use bdk::{SignOptions, Wallet as BdkWallet}; |
13 | | -use bdk::wallet::tx_builder::ChangeSpendPolicy; |
14 | 14 |
|
15 | 15 | use std::collections::HashSet; |
16 | 16 | use std::sync::{Arc, Mutex, MutexGuard}; |
@@ -461,15 +461,15 @@ impl TxBuilder { |
461 | 461 | }) |
462 | 462 | } |
463 | 463 |
|
464 | | - // /// Enable signaling RBF with a specific nSequence value. This can cause conflicts if the wallet's descriptors contain an |
465 | | - // /// "older" (OP_CSV) operator and the given `nsequence` is lower than the CSV value. If the `nsequence` is higher than `0xFFFFFFFD` |
466 | | - // /// an error will be thrown, since it would not be a valid nSequence to signal RBF. |
467 | | - // pub(crate) fn enable_rbf_with_sequence(&self, nsequence: u32) -> Arc<Self> { |
468 | | - // Arc::new(TxBuilder { |
469 | | - // rbf: Some(RbfValue::Value(nsequence)), |
470 | | - // ..self.clone() |
471 | | - // }) |
472 | | - // } |
| 464 | + /// Enable signaling RBF with a specific nSequence value. This can cause conflicts if the wallet's descriptors contain an |
| 465 | + /// "older" (OP_CSV) operator and the given `nsequence` is lower than the CSV value. If the `nsequence` is higher than `0xFFFFFFFD` |
| 466 | + /// an error will be thrown, since it would not be a valid nSequence to signal RBF. |
| 467 | + pub(crate) fn enable_rbf_with_sequence(&self, nsequence: u32) -> Arc<Self> { |
| 468 | + Arc::new(TxBuilder { |
| 469 | + rbf: Some(RbfValue::Value(nsequence)), |
| 470 | + ..self.clone() |
| 471 | + }) |
| 472 | + } |
473 | 473 |
|
474 | 474 | /// Add data as an output using OP_RETURN. |
475 | 475 | // pub(crate) fn add_data(&self, data: Vec<u8>) -> Arc<Self> { |
|
0 commit comments