diff --git a/params.go b/params.go index e6bdc8825..bf235a186 100644 --- a/params.go +++ b/params.go @@ -30,7 +30,11 @@ type params struct { } // mainNetParams contains parameters specific to the main network -// (btcwire.MainNet). +// (btcwire.MainNet). NOTE: The RPC port is intentionally different than the +// reference implementation because btcd does not handle wallet requests. The +// separate wallet process listens on the well-known port and forwards requests +// it does not handle on to btcd. This approach allows the wallet process +// to emulate the full reference implementation RPC API. var mainNetParams = params{ netName: "mainnet", btcnet: btcwire.MainNet, @@ -40,7 +44,7 @@ var mainNetParams = params{ powLimitBits: btcchain.ChainParams(btcwire.MainNet).PowLimitBits, listenPort: btcwire.MainPort, peerPort: btcwire.MainPort, - rpcPort: "8332", + rpcPort: "8334", dnsSeeds: []string{ "seed.bitcoin.sipa.be", "dnsseed.bluematt.me", @@ -50,7 +54,8 @@ var mainNetParams = params{ } // regressionParams contains parameters specific to the regression test network -// (btcwire.TestNet). +// (btcwire.TestNet). NOTE: The RPC port is intentionally different than the +// reference implementation - see the mainNetParams comment for details. var regressionParams = params{ netName: "regtest", btcnet: btcwire.TestNet, @@ -60,12 +65,13 @@ var regressionParams = params{ powLimitBits: btcchain.ChainParams(btcwire.TestNet).PowLimitBits, listenPort: btcwire.RegressionTestPort, peerPort: btcwire.TestNetPort, - rpcPort: "18332", + rpcPort: "18334", dnsSeeds: []string{}, } // testNet3Params contains parameters specific to the test network (version 3) -// (btcwire.TestNet3). +// (btcwire.TestNet3). NOTE: The RPC port is intentionally different than the +// reference implementation - see the mainNetParams comment for details. var testNet3Params = params{ netName: "testnet", btcnet: btcwire.TestNet3, @@ -75,7 +81,7 @@ var testNet3Params = params{ powLimitBits: btcchain.ChainParams(btcwire.TestNet3).PowLimitBits, listenPort: btcwire.TestNetPort, peerPort: btcwire.TestNetPort, - rpcPort: "18332", + rpcPort: "18334", dnsSeeds: []string{ "testnet-seed.bitcoin.petertodd.org", "testnet-seed.bluematt.me", diff --git a/sample-btcd.conf b/sample-btcd.conf index 73e99ce23..65eea08fc 100644 --- a/sample-btcd.conf +++ b/sample-btcd.conf @@ -108,7 +108,7 @@ ; norpc=1 ; The port used to listen for RPC connections. -; rpcport=8332 +; rpcport=8334 ; ------------------------------------------------------------------------------ diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 713487433..4367ef9e0 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -12,7 +12,7 @@ import ( const ( User = "rpcuser" Password = "rpcpass" - Server = "127.0.0.1:8332" + Server = "127.0.0.1:8334" ) var (