Merge pull request #8961 from yyforyongyu/fix-leaseoutput

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

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.