mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-14 10:29:29 +02:00
mulit: remove ListLeasedOutputs
in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` - the returned info from `ListLeasedOutputs` can easily be accessed via `FetchInputInfo` and this info is only used at one callsite. `ListLeasedOutputs` then becomes unnecessary here, plus it's very slow and needs to be refactored in `btcwallet` instead.
This commit is contained in:
@@ -179,7 +179,7 @@ type OutputLeaser interface {
|
||||
// LeaseOutput leases a target output, rendering it unusable for coin
|
||||
// selection.
|
||||
LeaseOutput(i wtxmgr.LockID, o wire.OutPoint, d time.Duration) (
|
||||
time.Time, []byte, btcutil.Amount, error)
|
||||
time.Time, error)
|
||||
|
||||
// ReleaseOutput releases a target output, allowing it to be used for
|
||||
// coin selection once again.
|
||||
@@ -284,7 +284,7 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
|
||||
log.Tracef("[WithCoinSelectLock] leasing utxo: %v",
|
||||
utxo.OutPoint)
|
||||
|
||||
_, _, _, err = outputLeaser.LeaseOutput(
|
||||
_, err = outputLeaser.LeaseOutput(
|
||||
chanfunding.LndInternalLockID, utxo.OutPoint,
|
||||
chanfunding.DefaultLockDuration,
|
||||
)
|
||||
|
Reference in New Issue
Block a user