From da973315d4e6b9a62c8dfa26f6f85e748ee68cce Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 3 Dec 2018 20:40:12 -0800 Subject: [PATCH] hltcswitch: use build package to detect debug build --- htlcswitch/link_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index f14d5bf9..e3c07a03 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -22,6 +22,7 @@ import ( "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" + "github.com/lightningnetwork/lnd/build" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/htlcswitch/hodl" @@ -1758,7 +1759,7 @@ func updateState(batchTick chan time.Time, link *channelLink, // TODO(roasbeef): add sync hook into packet processing so can eliminate all // sleep in this test and the one below func TestChannelLinkBandwidthConsistency(t *testing.T) { - if !hodl.DebugBuild { + if !build.IsDevBuild() { t.Fatalf("htlcswitch tests must be run with '-tags debug") } t.Parallel() @@ -2696,7 +2697,7 @@ func TestChannelLinkTrimCircuitsPending(t *testing.T) { // TestChannelLinkTrimCircuitsNoCommit checks that the switch and link properly trim // circuits if the ADDs corresponding to open circuits are never committed. func TestChannelLinkTrimCircuitsNoCommit(t *testing.T) { - if !hodl.DebugBuild { + if !build.IsDevBuild() { t.Fatalf("htlcswitch tests must be run with '-tags debug") }