Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
This commit is contained in:
20 files changed
+100
-87
No files matched your search
@@ -44,7 +44,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.
|
||||
|
||||
@@ -525,7 +525,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) {
|
||||
for _, coin := range selectedCoins {
|
||||
outpoint := coin.OutPoint
|
||||
|
||||
_, _, _, err = w.cfg.CoinLeaser.LeaseOutput(
|
||||
_, err = w.cfg.CoinLeaser.LeaseOutput(
|
||||
LndInternalLockID, outpoint,
|
||||
DefaultReservationTimeout,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user