Skip to content

Commit d9af0e3

Browse files
committed
doublespendinputs: remove RBF argument, RBF always on
1 parent 3b50a5c commit d9af0e3

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

cmd/chantools/doublespendinputs.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type doubleSpendInputs struct {
2727
SweepAddr string
2828
FeeRate uint32
2929
RecoveryWindow uint32
30-
Rbf bool
3130

3231
rootKey *rootKey
3332
cmd *cobra.Command
@@ -45,7 +44,6 @@ only be used with inputs that belong to an lnd wallet.`,
4544
--inputoutpoints xxxxxxxxx:y,xxxxxxxxx:y \
4645
--sweepaddr bc1q..... \
4746
--feerate 10 \
48-
--rbf=true \
4947
--publish`,
5048
RunE: cc.Execute,
5149
}
@@ -71,10 +69,6 @@ only be used with inputs that belong to an lnd wallet.`,
7169
"number of keys to scan per internal/external branch; output "+
7270
"will consist of double this amount of keys",
7371
)
74-
cc.cmd.Flags().BoolVar(
75-
&cc.Rbf, "rbf", true, "choose RBF flag for this double spend "+
76-
"transaction. (Be sure to use '=' with this argument)",
77-
)
7872
cc.cmd.Flags().BoolVar(
7973
&cc.Publish, "publish", false, "publish replacement TX to "+
8074
"the chain API instead of just printing the TX",
@@ -237,18 +231,11 @@ func (c *doubleSpendInputs) Execute(_ *cobra.Command, _ []string) error {
237231
// Create the transaction.
238232
tx := wire.NewMsgTx(2)
239233

240-
// enable/disable RBF
241-
var sequence uint32 = mempool.MaxRBFSequence
242-
if !c.Rbf {
243-
sequence = wire.MaxTxInSequenceNum
244-
}
245-
246234
// Add the inputs.
247235
for _, outpoint := range outpoints {
248-
249236
tx.AddTxIn(&wire.TxIn{
250237
PreviousOutPoint: *outpoint,
251-
Sequence: sequence,
238+
Sequence: mempool.MaxRBFSequence,
252239
})
253240
}
254241

doc/chantools_doublespendinputs.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ chantools doublespendinputs \
1919
--inputoutpoints xxxxxxxxx:y,xxxxxxxxx:y \
2020
--sweepaddr bc1q..... \
2121
--feerate 10 \
22-
--rbf=true \
2322
--publish
2423
```
2524

@@ -32,7 +31,6 @@ chantools doublespendinputs \
3231
-h, --help help for doublespendinputs
3332
--inputoutpoints strings list of outpoints to double spend in the format txid:vout
3433
--publish publish replacement TX to the chain API instead of just printing the TX
35-
--rbf choose RBF flag for this double spend transaction. (Be sure to use '=' with this argument) (default true)
3634
--recoverywindow uint32 number of keys to scan per internal/external branch; output will consist of double this amount of keys (default 2500)
3735
--rootkey string BIP32 HD root key of the wallet to use for deriving the input keys; leave empty to prompt for lnd 24 word aezeed
3836
--sweepaddr string address to recover the funds to; specify 'fromseed' to derive a new address from the seed automatically

0 commit comments

Comments
 (0)