mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
This commit is contained in:
@@ -3488,14 +3488,7 @@ func (r *rpcServer) WalletBalance(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
for _, leasedOutput := range leases {
|
||||
utxoInfo, err := r.server.cc.Wallet.FetchInputInfo(
|
||||
&leasedOutput.Outpoint,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
lockedBalance += utxoInfo.Value
|
||||
lockedBalance += btcutil.Amount(leasedOutput.Value)
|
||||
}
|
||||
|
||||
// Get the current number of non-private anchor channels.
|
||||
|
Reference in New Issue
Block a user