Skip to content

Commit 803773b

Browse files
committed
loop+loopd: fix linter after re-generating protos
Apparently re-generating the protos caused the linter to pick up on fields that are now deprecated. We need to fix that with a few comments.
1 parent 77f7b73 commit 803773b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmd/loop/loopout.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ func loopOut(ctx *cli.Context) error {
203203
}
204204

205205
fmt.Printf("Swap initiated\n")
206-
fmt.Printf("ID: %v\n", resp.Id)
207-
fmt.Printf("HTLC address: %v\n", resp.HtlcAddress)
206+
fmt.Printf("ID: %x\n", resp.IdBytes)
207+
fmt.Printf("HTLC address: %v\n", resp.HtlcAddress) // nolint:staticcheck
208208
if resp.ServerMessage != "" {
209209
fmt.Printf("Server message: %v\n", resp.ServerMessage)
210210
}

loopd/swapclient_server.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ func (s *swapClientServer) LoopOut(ctx context.Context,
121121
}
122122

123123
switch {
124-
case in.LoopOutChannel != 0 && len(in.OutgoingChanSet) > 0:
124+
case in.LoopOutChannel != 0 && len(in.OutgoingChanSet) > 0: // nolint:staticcheck
125125
return nil, errors.New("loop_out_channel and outgoing_" +
126126
"chan_ids are mutually exclusive")
127127

128-
case in.LoopOutChannel != 0:
129-
req.OutgoingChanSet = loopdb.ChannelSet{in.LoopOutChannel}
128+
case in.LoopOutChannel != 0: // nolint:staticcheck
129+
req.OutgoingChanSet = loopdb.ChannelSet{in.LoopOutChannel} // nolint:staticcheck
130130

131131
default:
132132
req.OutgoingChanSet = in.OutgoingChanSet
@@ -540,9 +540,9 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
540540

541541
if req.ExternalHtlc {
542542
response.HtlcAddressNp2Wsh = swapInfo.HtlcAddressNP2WSH.String()
543-
response.HtlcAddress = response.HtlcAddressNp2Wsh
543+
response.HtlcAddress = response.HtlcAddressNp2Wsh // nolint:staticcheck
544544
} else {
545-
response.HtlcAddress = response.HtlcAddressP2Wsh
545+
response.HtlcAddress = response.HtlcAddressP2Wsh // nolint:staticcheck
546546
}
547547

548548
return response, nil

0 commit comments

Comments
 (0)