From 5cfcd41f32bef97ceaa16c498d897820b4f0fbfc Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Thu, 17 Nov 2022 17:01:31 +0100 Subject: [PATCH] bytes.Equal instead of compare --- intercept.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intercept.go b/intercept.go index e1f39e0..f8ed8f4 100644 --- a/intercept.go +++ b/intercept.go @@ -51,7 +51,7 @@ func intercept(reqPaymentHash []byte, reqOutgoingAmountMsat uint64, reqOutgoingE if paymentSecret != nil { if channelPoint == nil { - if bytes.Compare(paymentHash, reqPaymentHash) == 0 { + if bytes.Equal(paymentHash, reqPaymentHash) { channelPoint, err = openChannel(client, reqPaymentHash, destination, incomingAmountMsat) log.Printf("openChannel(%x, %v) err: %v", destination, incomingAmountMsat, err) if err != nil {