Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the performace of LeaseOutput #8961

Merged
merged 9 commits into from
Aug 21, 2024
9 changes: 1 addition & 8 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Roasbeef marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

// Get the current number of non-private anchor channels.
Expand Down