From 2a51cf93185fbc7170adf63644a661d439cac43f Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Tue, 6 Aug 2024 11:34:48 -0300 Subject: [PATCH 1/2] fix: update check to verify string, otherwise it fails to verify --- btcclient/client_block_subscriber.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btcclient/client_block_subscriber.go b/btcclient/client_block_subscriber.go index f0926a01..1b320ac6 100644 --- a/btcclient/client_block_subscriber.go +++ b/btcclient/client_block_subscriber.go @@ -2,6 +2,7 @@ package btcclient import ( "fmt" + "strings" "time" "github.com/babylonlabs-io/babylon/types/retry" @@ -56,7 +57,7 @@ func NewWithBlockSubscriber(cfg *config.BTCConfig, retrySleepTime, maxRetrySleep if err != nil { return nil, fmt.Errorf("failed to get BTC backend: %v", err) } - if backend != rpcclient.BitcoindPost25 { + if !strings.EqualFold(backend.String(), rpcclient.BitcoindPost25.String()) { return nil, fmt.Errorf("zmq is only supported by bitcoind, but got %v", backend) } From 7d3dd11a5b8a9bcb3007d39d46e07922fac944c1 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Thu, 8 Aug 2024 08:59:01 -0300 Subject: [PATCH 2/2] chore: modify check to be bitcoind --- btcclient/client_block_subscriber.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btcclient/client_block_subscriber.go b/btcclient/client_block_subscriber.go index 1b320ac6..1360deab 100644 --- a/btcclient/client_block_subscriber.go +++ b/btcclient/client_block_subscriber.go @@ -57,7 +57,7 @@ func NewWithBlockSubscriber(cfg *config.BTCConfig, retrySleepTime, maxRetrySleep if err != nil { return nil, fmt.Errorf("failed to get BTC backend: %v", err) } - if !strings.EqualFold(backend.String(), rpcclient.BitcoindPost25.String()) { + if !strings.Contains(backend.String(), "bitcoind") { return nil, fmt.Errorf("zmq is only supported by bitcoind, but got %v", backend) }