Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ZMQ events when using bitcoind #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiero
Copy link
Member

@tiero tiero commented Sep 2, 2024

It closes #267

@tiero tiero requested a review from altafan September 2, 2024 22:09
return fmt.Errorf("failed to start bitcoind connection: %w", err)
}

chainClient := bitcoindConn.NewBitcoindClient()
Copy link
Member Author

@tiero tiero Sep 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a problem using a local node with http instead of https: it wont work unless you patch btcd method!

// NewBitcoindConn creates a client connection to the node described by the host
// string. The ZMQ connections are established immediately to ensure liveness.
// If the remote node does not operate on the same bitcoin network as described
// by the passed chain parameters, the connection will be disconnected.
func NewBitcoindConn(cfg *BitcoindConfig) (*BitcoindConn, error) {
	clientCfg := &rpcclient.ConnConfig{
		Host:                 cfg.Host,
		User:                 cfg.User,
		Pass:                 cfg.Pass,
		DisableAutoReconnect: false,
		DisableConnectOnNew:  true,
		DisableTLS:           **true**,
		HTTPPostMode:         true,
		Params:               cfg.ChainParams.Name,
	}

@tiero tiero changed the title add ZMQ env vars Use ZMQ events when using bitcoind Sep 16, 2024
@tiero tiero marked this pull request as ready for review September 16, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arkd: support ZMQ connection
1 participant