• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 14358372723

09 Apr 2025 01:26PM UTC coverage: 56.696% (-12.3%) from 69.037%
14358372723

Pull #9696

github

web-flow
Merge e2837e400 into 867d27d68
Pull Request #9696: Add `development_guidelines.md` for both human and machine

107055 of 188823 relevant lines covered (56.7%)

22721.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/chainreg/chainparams.go
1
package chainreg
2

3
import (
4
        bitcoinCfg "github.com/btcsuite/btcd/chaincfg"
5
        bitcoinWire "github.com/btcsuite/btcd/wire"
6
        "github.com/lightningnetwork/lnd/keychain"
7
)
8

9
// BitcoinNetParams couples the p2p parameters of a network with the
10
// corresponding RPC port of a daemon running on the particular network.
11
type BitcoinNetParams struct {
12
        *bitcoinCfg.Params
13
        RPCPort  string
14
        CoinType uint32
15
}
16

17
// BitcoinTestNetParams contains parameters specific to the 3rd version of the
18
// test network.
19
var BitcoinTestNetParams = BitcoinNetParams{
20
        Params:   &bitcoinCfg.TestNet3Params,
21
        RPCPort:  "18334",
22
        CoinType: keychain.CoinTypeTestnet,
23
}
24

25
// BitcoinTestNet4Params contains parameters specific to the 4th version of the
26
// test network.
27
var BitcoinTestNet4Params = BitcoinNetParams{
28
        Params:   &bitcoinCfg.TestNet4Params,
29
        RPCPort:  "48334",
30
        CoinType: keychain.CoinTypeTestnet,
31
}
32

33
// BitcoinMainNetParams contains parameters specific to the current Bitcoin
34
// mainnet.
35
var BitcoinMainNetParams = BitcoinNetParams{
36
        Params:   &bitcoinCfg.MainNetParams,
37
        RPCPort:  "8334",
38
        CoinType: keychain.CoinTypeBitcoin,
39
}
40

41
// BitcoinSimNetParams contains parameters specific to the simulation test
42
// network.
43
var BitcoinSimNetParams = BitcoinNetParams{
44
        Params:   &bitcoinCfg.SimNetParams,
45
        RPCPort:  "18556",
46
        CoinType: keychain.CoinTypeTestnet,
47
}
48

49
// BitcoinSigNetParams contains parameters specific to the signet test network.
50
var BitcoinSigNetParams = BitcoinNetParams{
51
        Params:   &bitcoinCfg.SigNetParams,
52
        RPCPort:  "38332",
53
        CoinType: keychain.CoinTypeTestnet,
54
}
55

56
// BitcoinRegTestNetParams contains parameters specific to a local bitcoin
57
// regtest network.
58
var BitcoinRegTestNetParams = BitcoinNetParams{
59
        Params:   &bitcoinCfg.RegressionNetParams,
60
        RPCPort:  "18334",
61
        CoinType: keychain.CoinTypeTestnet,
62
}
63

64
// IsTestnet tests if the given params correspond to a testnet parameter
65
// configuration.
66
func IsTestnet(params *BitcoinNetParams) bool {
×
67
        return params.Params.Net == bitcoinWire.TestNet3 ||
×
68
                params.Params.Net == bitcoinWire.TestNet4
×
69
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc