-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add basic bitcoin signet support #5025
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -377,10 +377,13 @@ func NewChainControl(cfg *Config, blockCache *blockcache.BlockCache) ( | |
| (cfg.Litecoin.Active && cfg.Litecoin.RegTest) { | ||
| conn, err := net.Dial("tcp", bitcoindHost) | ||
| if err != nil || conn == nil { | ||
| if cfg.Bitcoin.Active && cfg.Bitcoin.RegTest { | ||
| switch { | ||
| case cfg.Bitcoin.Active && cfg.Bitcoin.RegTest: | ||
| rpcPort = 18443 | ||
| } else if cfg.Litecoin.Active && cfg.Litecoin.RegTest { | ||
| case cfg.Litecoin.Active && cfg.Litecoin.RegTest: | ||
| rpcPort = 19443 | ||
| case cfg.Bitcoin.Active && cfg.Bitcoin.SigNet: | ||
| rpcPort = 38332 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vwoo perhaps something is being morphed before the call is made? We enforce the default port here
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I change the signet port from 38332 to 38334 in chainreg/chainparams.go then the default port works. Just following the pattern in the rest of chainparams.go where the port is always +2. bitcoind --help | grep rpcport chainreg/chainparams.go Seems like the pattern break is intentional but maybe there was a mixup between chainregistry.go and chainparams.go?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| bitcoindHost = fmt.Sprintf("%v:%d", | ||
| bitcoindMode.RPCHost, | ||
|
|
@@ -743,6 +746,14 @@ var ( | |
| 0x01, 0xea, 0x33, 0x09, 0x00, 0x00, 0x00, 0x00, | ||
| }) | ||
|
|
||
| // BitcoinSignetGenesis is the genesis hash of Bitcoin's signet chain. | ||
| BitcoinSignetGenesis = chainhash.Hash([chainhash.HashSize]byte{ | ||
| 0xf6, 0x1e, 0xee, 0x3b, 0x63, 0xa3, 0x80, 0xa4, | ||
| 0x77, 0xa0, 0x63, 0xaf, 0x32, 0xb2, 0xbb, 0xc9, | ||
| 0x7c, 0x9f, 0xf9, 0xf0, 0x1f, 0x2c, 0x42, 0x25, | ||
| 0xe9, 0x73, 0x98, 0x81, 0x08, 0x00, 0x00, 0x00, | ||
| }) | ||
|
|
||
| // BitcoinMainnetGenesis is the genesis hash of Bitcoin's main chain. | ||
| BitcoinMainnetGenesis = chainhash.Hash([chainhash.HashSize]byte{ | ||
| 0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72, | ||
|
|
@@ -808,6 +819,12 @@ var ( | |
| }, | ||
| }, | ||
|
|
||
| BitcoinSignetGenesis: { | ||
| { | ||
| "ln.signet.secp.tech", | ||
| }, | ||
| }, | ||
|
|
||
| LitecoinMainnetGenesis: { | ||
| { | ||
| "ltc.nodes.lightning.directory", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.