From 1df6685653225ee7bfd3e80eeb8218cf8375f490 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Wed, 8 Jun 2022 12:09:02 +0200 Subject: [PATCH] looprpc: fix suggestswaps response This commit fixes the SuggestSwaps rpc call. Previously, when multiple DisqualifiedPeers were provided, all pubkeys would be the same. --- loopd/swapclient_server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 564d84a..c52fd7d 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -885,9 +885,12 @@ func (s *swapClientServer) SuggestSwaps(ctx context.Context, return nil, err } + clonedPubkey := route.Vertex{} + copy(clonedPubkey[:], pubkey[:]) + exclChan := &clientrpc.Disqualified{ Reason: autoloopReason, - Pubkey: pubkey[:], + Pubkey: clonedPubkey[:], } resp.Disqualified = append(resp.Disqualified, exclChan)