github.com/decred/politeia@v1.4.0/politeiawww/config/params.go (about)

     1  // Copyright (c) 2013-2014 The btcsuite developers
     2  // Copyright (c) 2015-2021 The Decred developers
     3  // Use of this source code is governed by an ISC
     4  // license that can be found in the LICENSE file.
     5  
     6  package config
     7  
     8  import (
     9  	"github.com/decred/dcrd/chaincfg/v3"
    10  )
    11  
    12  // ChainParams is used to group parameters for various networks such as the
    13  // main network and test networks.
    14  type ChainParams struct {
    15  	*chaincfg.Params
    16  	WalletRPCServerPort string
    17  }
    18  
    19  // mainNetParams contains parameters specific to the main network
    20  // (wire.MainNet).  NOTE: The RPC port is intentionally different than the
    21  // reference implementation because dcrd does not handle wallet requests.  The
    22  // separate wallet process listens on the well-known port and forwards requests
    23  // it does not handle on to dcrd.  This approach allows the wallet process
    24  // to emulate the full reference implementation RPC API.
    25  var MainNetParams = ChainParams{
    26  	Params:              chaincfg.MainNetParams(),
    27  	WalletRPCServerPort: "9111",
    28  }
    29  
    30  // testNet3Params contains parameters specific to the test network (version 0)
    31  // (wire.TestNet).  NOTE: The RPC port is intentionally different than the
    32  // reference implementation - see the mainNetParams comment for details.
    33  
    34  var TestNet3Params = ChainParams{
    35  	Params:              chaincfg.TestNet3Params(),
    36  	WalletRPCServerPort: "19111",
    37  }
    38  
    39  // simNetParams contains parameters specific to the simulation test network
    40  // (wire.SimNet).
    41  var SimNetParams = ChainParams{
    42  	Params:              chaincfg.SimNetParams(),
    43  	WalletRPCServerPort: "19558",
    44  }