Upcoming changes constitute breaking public API changes to the chaincfg
module, therefore, this follows the process for introducing major API
breaks which consists of:
- Bump the major version in the go.mod of the affected module if not
already done since the last release tag
- Add a replacement to the go.mod in the main module if not already done
since the last release tag
- Update all imports in the repo to use the new major version as
necessary
- Make necessary modifications to allow all other modules to use the
new version in the same commit
- Repeat the process for any other modules the require a new major as a
result of consuming the new major(s)
50 lines
1.5 KiB
Go
50 lines
1.5 KiB
Go
// Copyright (c) 2013-2016 The btcsuite developers
|
|
// Copyright (c) 2015-2020 The Decred developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/decred/dcrd/chaincfg/v3"
|
|
)
|
|
|
|
// params is used to group parameters for various networks such as the main
|
|
// network and test networks.
|
|
type params struct {
|
|
*chaincfg.Params
|
|
rpcPort string
|
|
}
|
|
|
|
// mainNetParams contains parameters specific to the main network
|
|
// (wire.MainNet). NOTE: The RPC port is intentionally different than the
|
|
// reference implementation because dcrd does not handle wallet requests. The
|
|
// separate wallet process listens on the well-known port and forwards requests
|
|
// it does not handle on to dcrd. This approach allows the wallet process
|
|
// to emulate the full reference implementation RPC API.
|
|
var mainNetParams = params{
|
|
Params: chaincfg.MainNetParams(),
|
|
rpcPort: "9109",
|
|
}
|
|
|
|
// testNet3Params contains parameters specific to the test network (version 3)
|
|
// (wire.TestNet3).
|
|
var testNet3Params = params{
|
|
Params: chaincfg.TestNet3Params(),
|
|
rpcPort: "19109",
|
|
}
|
|
|
|
// simNetParams contains parameters specific to the simulation test network
|
|
// (wire.SimNet).
|
|
var simNetParams = params{
|
|
Params: chaincfg.SimNetParams(),
|
|
rpcPort: "19556",
|
|
}
|
|
|
|
// regNetParams contains parameters specific to the regression test
|
|
// network (wire.RegNet).
|
|
var regNetParams = params{
|
|
Params: chaincfg.RegNetParams(),
|
|
rpcPort: "18656",
|
|
}
|