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

Extract simnet btcwallet/btcd creation/config into new package #85

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

Conversation

Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Apr 7, 2015

This PR extracts useful functions/types for the purpose launching btcd/btcwallet processes with parameterized configuration options. The motivation for this PR is to publicly expose functionality necessary for creating rpc test-harnesses around btcd/btcwallet.

The changes are mostly just moving a set of targeted files into a new package. Constructors around command-line arguments for launching the processes have been modified to include information which were previously a package-level global variables. Additionally, BtcdArgs has been modified to allow optionally launching a simnet node with the addrindex activated.

Concerning the name of the package, simnode, I'm open to any other suggestions. "simnode" seemed to kind of fit.

@tuxcanfly
Copy link
Contributor

Sounds good. I've pushed a fix for the failing build so a rebase might be required.

}

// NewNodeFromArgs starts a new node using the args provided, sets the handlers
// and loggers. It does not start the node process, Start() should be called for that
func NewNodeFromArgs(args Args, handlers *rpc.NotificationHandlers, w io.Writer) (*Node, error) {
func NewNodeFromArgs(args Args, handlers *rpc.NotificationHandlers, w io.Writer, maxRetries int, dataDir string) (*Node, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we're assuming dataDir already exists. We can update the docs mentioning this or create the directory if it doesn't exist.

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.

None yet

2 participants