doublespendinputs: remove RBF argument, RBF always on

pull/118/head
Felix Passenberg 3 months ago
parent 3b50a5ce16
commit d9af0e36e5
No known key found for this signature in database

@ -27,7 +27,6 @@ type doubleSpendInputs struct {
SweepAddr string
FeeRate uint32
RecoveryWindow uint32
Rbf bool
rootKey *rootKey
cmd *cobra.Command
@ -45,7 +44,6 @@ only be used with inputs that belong to an lnd wallet.`,
--inputoutpoints xxxxxxxxx:y,xxxxxxxxx:y \
--sweepaddr bc1q..... \
--feerate 10 \
--rbf=true \
--publish`,
RunE: cc.Execute,
}
@ -71,10 +69,6 @@ only be used with inputs that belong to an lnd wallet.`,
"number of keys to scan per internal/external branch; output "+
"will consist of double this amount of keys",
)
cc.cmd.Flags().BoolVar(
&cc.Rbf, "rbf", true, "choose RBF flag for this double spend "+
"transaction. (Be sure to use '=' with this argument)",
)
cc.cmd.Flags().BoolVar(
&cc.Publish, "publish", false, "publish replacement TX to "+
"the chain API instead of just printing the TX",
@ -237,18 +231,11 @@ func (c *doubleSpendInputs) Execute(_ *cobra.Command, _ []string) error {
// Create the transaction.
tx := wire.NewMsgTx(2)
// enable/disable RBF
var sequence uint32 = mempool.MaxRBFSequence
if !c.Rbf {
sequence = wire.MaxTxInSequenceNum
}
// Add the inputs.
for _, outpoint := range outpoints {
tx.AddTxIn(&wire.TxIn{
PreviousOutPoint: *outpoint,
Sequence: sequence,
Sequence: mempool.MaxRBFSequence,
})
}

@ -19,7 +19,6 @@ chantools doublespendinputs \
--inputoutpoints xxxxxxxxx:y,xxxxxxxxx:y \
--sweepaddr bc1q..... \
--feerate 10 \
--rbf=true \
--publish
```
@ -32,7 +31,6 @@ chantools doublespendinputs \
-h, --help help for doublespendinputs
--inputoutpoints strings list of outpoints to double spend in the format txid:vout
--publish publish replacement TX to the chain API instead of just printing the TX
--rbf choose RBF flag for this double spend transaction. (Be sure to use '=' with this argument) (default true)
--recoverywindow uint32 number of keys to scan per internal/external branch; output will consist of double this amount of keys (default 2500)
--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
--sweepaddr string address to recover the funds to; specify 'fromseed' to derive a new address from the seed automatically

Loading…
Cancel
Save