mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-10 21:03:04 +01:00
sweep: change outputs are now P2TR
This commit is contained in:
@@ -139,7 +139,7 @@ func newTxInputSet(wallet Wallet, feePerKW chainfee.SatPerKWeight,
|
|||||||
func (t *txInputSet) enoughInput() bool {
|
func (t *txInputSet) enoughInput() bool {
|
||||||
// If we have a change output above dust, then we certainly have enough
|
// If we have a change output above dust, then we certainly have enough
|
||||||
// inputs to the transaction.
|
// inputs to the transaction.
|
||||||
if t.changeOutput >= lnwallet.DustLimitForSize(input.P2WPKHSize) {
|
if t.changeOutput >= lnwallet.DustLimitForSize(input.P2TRSize) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,8 @@ func generateInputPartitionings(sweepableInputs []txInput,
|
|||||||
// continuing with the remaining inputs will only lead to sets
|
// continuing with the remaining inputs will only lead to sets
|
||||||
// with an even lower output value.
|
// with an even lower output value.
|
||||||
if !txInputs.enoughInput() {
|
if !txInputs.enoughInput() {
|
||||||
// The change output is always a p2wpkh here.
|
// The change output is always a p2tr here.
|
||||||
dl := lnwallet.DustLimitForSize(input.P2WPKHSize)
|
dl := lnwallet.DustLimitForSize(input.P2TRSize)
|
||||||
log.Debugf("Set value %v (r=%v, c=%v) below dust "+
|
log.Debugf("Set value %v (r=%v, c=%v) below dust "+
|
||||||
"limit of %v", txInputs.totalOutput(),
|
"limit of %v", txInputs.totalOutput(),
|
||||||
txInputs.requiredOutput, txInputs.changeOutput,
|
txInputs.requiredOutput, txInputs.changeOutput,
|
||||||
|
|||||||
Reference in New Issue
Block a user