mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-07 11:22:10 +02:00
lnwallet+sweep: introduce TxPublisher
to handle fee bump
This commit adds `TxPublisher` which implements `Bumper` interface. This is part one of the implementation that focuses on implementing the `Broadcast` method which guarantees a tx can be published with RBF-compliant. It does so by leveraging the `testmempoolaccept` API, keep increasing the fee rate until an RBF-compliant tx is made and broadcasts it. This tx will then be monitored by the `TxPublisher` and in the following commit, the monitoring process will be added.
This commit is contained in:
@@ -205,15 +205,14 @@ func createSweepTx(inputs []input.Input, outputs []*wire.TxOut,
|
||||
}
|
||||
}
|
||||
|
||||
log.Infof("Creating sweep transaction %v for %v inputs (%s) "+
|
||||
"using %v sat/kw, tx_weight=%v, tx_fee=%v, parents_count=%v, "+
|
||||
"parents_fee=%v, parents_weight=%v",
|
||||
log.Debugf("Creating sweep transaction %v for %v inputs (%s) "+
|
||||
"using %v, tx_weight=%v, tx_fee=%v, parents_count=%v, "+
|
||||
"parents_fee=%v, parents_weight=%v, current_height=%v",
|
||||
sweepTx.TxHash(), len(inputs),
|
||||
inputTypeSummary(inputs), feeRate,
|
||||
estimator.weight(), txFee,
|
||||
len(estimator.parents), estimator.parentsFee,
|
||||
estimator.parentsWeight,
|
||||
)
|
||||
estimator.parentsWeight, currentBlockHeight)
|
||||
|
||||
return sweepTx, txFee, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user