Update RBF nsequence to 0xFFFFFFFD (#3077)
Technically `0x1` will signal opt-in RBF (since 0x1 ≤ 0xFFFFFFFD); however it also sets a relative timelock of 1 block. This seems like an unintended bug. It also fingerprints cake wallet since `0x1` is an abnormal value. This is especially harmful in collaborative settings e.g payjoin. Most wallets set `nsequence = 0xFFFFFFFD` to opt into RBF or just use full rbf which seems to be gaining more adoption.
Armin Sabouri committed
Mar 13, 2026 at 18:42 UTC
4d61345f307ef6e2853bb432003b576ae686dfbf
1 file changed
+1
-1
cw_bitcoin/lib/psbt/transaction_builder.dart
+1
-1
@@ -25,7 +25,7 @@ class PSBTTransactionBuild {
25
26
psbt.setInputPreviousTxId(i, Uint8List.fromList(hex.decode(input.utxo.txHash).reversed.toList()));
27
psbt.setInputOutputIndex(i, input.utxo.vout);
28
- psbt.setInputSequence(i, enableRBF ? 0x1 : 0xffffffff);
28
+ psbt.setInputSequence(i, enableRBF ? 0xfffffffd : 0xffffffff);
29
30
31
if (input.utxo.isSegwit()) {