Skip to content

Commit 1df6685

Browse files
committed
looprpc: fix suggestswaps response
This commit fixes the SuggestSwaps rpc call. Previously, when multiple DisqualifiedPeers were provided, all pubkeys would be the same.
1 parent dfe50e4 commit 1df6685

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

loopd/swapclient_server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,12 @@ func (s *swapClientServer) SuggestSwaps(ctx context.Context,
885885
return nil, err
886886
}
887887

888+
clonedPubkey := route.Vertex{}
889+
copy(clonedPubkey[:], pubkey[:])
890+
888891
exclChan := &clientrpc.Disqualified{
889892
Reason: autoloopReason,
890-
Pubkey: pubkey[:],
893+
Pubkey: clonedPubkey[:],
891894
}
892895

893896
resp.Disqualified = append(resp.Disqualified, exclChan)

0 commit comments

Comments
 (0)