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

chore: add btc wallet name to connection config #25

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

RafilxTenfen
Copy link
Contributor

No description provided.

@RafilxTenfen RafilxTenfen self-assigned this Aug 16, 2024
@RafilxTenfen RafilxTenfen changed the base branch from main to dev August 16, 2024 13:29
@@ -75,6 +77,7 @@ func NewRpcWalletControllerFromArgs(
// we use post mode as it sure it works with either bitcoind or btcwallet
// we may need to re-consider it later if we need any notifications
HTTPPostMode: true,
Params: params.Name,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this was needed, but I saw during debug that it was going to the fallthrough option if not set

 // btcd/rpcclient/infrastructure.go

	// Default network is mainnet, no parameters are necessary but if mainnet
	// is specified it will be the param
	switch config.Params {
	case "":
		fallthrough
	case chaincfg.MainNetParams.Name:
		client.chainParams = &chaincfg.MainNetParams
	case chaincfg.TestNet3Params.Name:
		client.chainParams = &chaincfg.TestNet3Params
	case chaincfg.RegressionNetParams.Name:
		client.chainParams = &chaincfg.RegressionNetParams
	case chaincfg.SimNetParams.Name:
		client.chainParams = &chaincfg.SimNetParams
	default:
		return nil, fmt.Errorf("rpcclient.New: Unknown chain %s", config.Params)
	}

Copy link
Collaborator

Choose a reason for hiding this comment

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

yea, the problem is the upstream btcd, does not support signet. So if:

  • we do not specify it then for signet we will run with &chaincfg.MainNetParams which for most cases is fine. Though it may, have some weird behaviour when decoding/encoding addresses
  • if we do specify it then for signet staker will not start

For now in most of our programs, we do not specify it so that we are always able to start the programs on signet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed at c6d6b37

@RafilxTenfen RafilxTenfen marked this pull request as draft August 16, 2024 13:35
@@ -75,6 +77,7 @@ func NewRpcWalletControllerFromArgs(
// we use post mode as it sure it works with either bitcoind or btcwallet
// we may need to re-consider it later if we need any notifications
HTTPPostMode: true,
Params: params.Name,
Copy link
Collaborator

Choose a reason for hiding this comment

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

yea, the problem is the upstream btcd, does not support signet. So if:

  • we do not specify it then for signet we will run with &chaincfg.MainNetParams which for most cases is fine. Though it may, have some weird behaviour when decoding/encoding addresses
  • if we do specify it then for signet staker will not start

For now in most of our programs, we do not specify it so that we are always able to start the programs on signet.

@RafilxTenfen RafilxTenfen marked this pull request as ready for review August 16, 2024 15:12
@RafilxTenfen RafilxTenfen merged commit 1606ca1 into dev Aug 19, 2024
8 checks passed
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.

2 participants