From 26886731d4499ada04d35a4bbc03ec6d7af48726 Mon Sep 17 00:00:00 2001 From: carla Date: Thu, 9 Dec 2021 13:38:26 +0200 Subject: [PATCH] multi: remove shadowed label variable in loopin swaps We already have a Label field in the embedded SwapContract field for loop in swaps. This commit removes an erroneously added Label field in LoopInContract which may be a cause of ambiguity when referencing this field. --- liquidity/liquidity_test.go | 4 +++- loopdb/loopin.go | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index 203e2c4..398aba4 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -1596,8 +1596,10 @@ func TestBudgetWithLoopin(t *testing.T) { SwapContract: loopdb.SwapContract{ InitiationTime: outsideBudget, MaxSwapFee: budget, + Label: labels.AutoloopLabel( + swap.TypeIn, + ), }, - Label: labels.AutoloopLabel(swap.TypeIn), } // Set our spend equal to our budget so we don't need to diff --git a/loopdb/loopin.go b/loopdb/loopin.go index e5fccb4..7a665e2 100644 --- a/loopdb/loopin.go +++ b/loopdb/loopin.go @@ -26,10 +26,6 @@ type LoopInContract struct { // ExternalHtlc specifies whether the htlc is published by an external // source. ExternalHtlc bool - - // Label contains an optional label for the swap. Note that this field - // is stored separately to the rest of the contract on disk. - Label string } // LoopIn is a combination of the contract and the updates.