From 218f8df5bac459e559500f09f81a87545cc58155 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Thu, 29 May 2014 11:59:36 -0500 Subject: [PATCH] Add a default net port parameter to each network. ok @jrick --- params.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/params.go b/params.go index 778635f6..10c612de 100644 --- a/params.go +++ b/params.go @@ -48,8 +48,9 @@ type Checkpoint struct { // used by Bitcoin applications to differentiate networks as well as addresses // and keys for one network from those intended for use on another network. type Params struct { - Name string - Net btcwire.BitcoinNet + Name string + Net btcwire.BitcoinNet + DefaultPort string // Chain parameters GenesisBlock *btcwire.MsgBlock @@ -83,8 +84,9 @@ type Params struct { // MainNetParams defines the network parameters for the main Bitcoin network. var MainNetParams = Params{ - Name: "mainnet", - Net: btcwire.MainNet, + Name: "mainnet", + Net: btcwire.MainNet, + DefaultPort: "8333", // Chain parameters GenesisBlock: &genesisBlock, @@ -138,8 +140,9 @@ var MainNetParams = Params{ // Bitcoin network. Not to be confused with the test Bitcoin network (version // 3), this network is sometimes simply called "testnet". var RegressionNetParams = Params{ - Name: "regtest", - Net: btcwire.TestNet, + Name: "regtest", + Net: btcwire.TestNet, + DefaultPort: "18444", // Chain parameters GenesisBlock: ®TestGenesisBlock, @@ -178,8 +181,9 @@ var RegressionNetParams = Params{ // (version 3). Not to be confused with the regression test network, this // network is sometimes simply called "testnet". var TestNet3Params = Params{ - Name: "testnet3", - Net: btcwire.TestNet3, + Name: "testnet3", + Net: btcwire.TestNet3, + DefaultPort: "18333", // Chain parameters GenesisBlock: &testNet3GenesisBlock,