Add a default net port parameter to each network.
ok @jrick
This commit is contained in:
parent
01799eeff1
commit
218f8df5ba
1 changed files with 12 additions and 8 deletions
20
params.go
20
params.go
|
@ -48,8 +48,9 @@ type Checkpoint struct {
|
||||||
// used by Bitcoin applications to differentiate networks as well as addresses
|
// used by Bitcoin applications to differentiate networks as well as addresses
|
||||||
// and keys for one network from those intended for use on another network.
|
// and keys for one network from those intended for use on another network.
|
||||||
type Params struct {
|
type Params struct {
|
||||||
Name string
|
Name string
|
||||||
Net btcwire.BitcoinNet
|
Net btcwire.BitcoinNet
|
||||||
|
DefaultPort string
|
||||||
|
|
||||||
// Chain parameters
|
// Chain parameters
|
||||||
GenesisBlock *btcwire.MsgBlock
|
GenesisBlock *btcwire.MsgBlock
|
||||||
|
@ -83,8 +84,9 @@ type Params struct {
|
||||||
|
|
||||||
// MainNetParams defines the network parameters for the main Bitcoin network.
|
// MainNetParams defines the network parameters for the main Bitcoin network.
|
||||||
var MainNetParams = Params{
|
var MainNetParams = Params{
|
||||||
Name: "mainnet",
|
Name: "mainnet",
|
||||||
Net: btcwire.MainNet,
|
Net: btcwire.MainNet,
|
||||||
|
DefaultPort: "8333",
|
||||||
|
|
||||||
// Chain parameters
|
// Chain parameters
|
||||||
GenesisBlock: &genesisBlock,
|
GenesisBlock: &genesisBlock,
|
||||||
|
@ -138,8 +140,9 @@ var MainNetParams = Params{
|
||||||
// Bitcoin network. Not to be confused with the test Bitcoin network (version
|
// Bitcoin network. Not to be confused with the test Bitcoin network (version
|
||||||
// 3), this network is sometimes simply called "testnet".
|
// 3), this network is sometimes simply called "testnet".
|
||||||
var RegressionNetParams = Params{
|
var RegressionNetParams = Params{
|
||||||
Name: "regtest",
|
Name: "regtest",
|
||||||
Net: btcwire.TestNet,
|
Net: btcwire.TestNet,
|
||||||
|
DefaultPort: "18444",
|
||||||
|
|
||||||
// Chain parameters
|
// Chain parameters
|
||||||
GenesisBlock: ®TestGenesisBlock,
|
GenesisBlock: ®TestGenesisBlock,
|
||||||
|
@ -178,8 +181,9 @@ var RegressionNetParams = Params{
|
||||||
// (version 3). Not to be confused with the regression test network, this
|
// (version 3). Not to be confused with the regression test network, this
|
||||||
// network is sometimes simply called "testnet".
|
// network is sometimes simply called "testnet".
|
||||||
var TestNet3Params = Params{
|
var TestNet3Params = Params{
|
||||||
Name: "testnet3",
|
Name: "testnet3",
|
||||||
Net: btcwire.TestNet3,
|
Net: btcwire.TestNet3,
|
||||||
|
DefaultPort: "18333",
|
||||||
|
|
||||||
// Chain parameters
|
// Chain parameters
|
||||||
GenesisBlock: &testNet3GenesisBlock,
|
GenesisBlock: &testNet3GenesisBlock,
|
||||||
|
|
Loading…
Add table
Reference in a new issue