Skip to content

Commit

Permalink
fix: update check to verify string, otherwise it fails to verify
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Aug 6, 2024
1 parent d73b523 commit 2a51cf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion btcclient/client_block_subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package btcclient

import (
"fmt"
"strings"
"time"

"github.com/babylonlabs-io/babylon/types/retry"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 2a51cf9

Please sign in to comment.