Merge pull request #8961 from yyforyongyu/fix-leaseoutput

Improve the performace of `LeaseOutput`
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2024-08-21 16:31:26 -07:00
commit cc9e2b783e
20 files changed
+100 -87

No files matched your search

+1 -8
View File
@@ -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.