wtclient: lint the package

This commit fixes some lints in the wtclient package. This is done so
that upcoming logic changes are easier to parse.
This commit is contained in:
Elle Mouton committed 2023-04-24 13:15:40 +02:00
1 parent 85ec38f447
commit 530a8cae5d
4 files changed
+40 -23

No files matched your search

+5 -2
View File
@@ -223,7 +223,9 @@ func (t *backupTask) bindSession(session *wtdb.ClientSessionBody) error {
// P2WKH output. Anchor channels spend a to-remote confirmed
// P2WSH output.
if t.chanType.HasAnchors() {
weightEstimate.AddWitnessInput(input.ToRemoteConfirmedWitnessSize)
weightEstimate.AddWitnessInput(
input.ToRemoteConfirmedWitnessSize,
)
} else {
weightEstimate.AddWitnessInput(input.P2WKHWitnessSize)
}
@@ -231,7 +233,8 @@ func (t *backupTask) bindSession(session *wtdb.ClientSessionBody) error {
// All justice transactions will either use segwit v0 (p2wkh + p2wsh)
// or segwit v1 (p2tr).
if err := addScriptWeight(&weightEstimate, t.sweepPkScript); err != nil {
err := addScriptWeight(&weightEstimate, t.sweepPkScript)
if err != nil {
return err
}