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

lightningnetwork / lnd / 12284350326

11 Dec 2024 08:27PM UTC coverage: 57.485% (+7.9%) from 49.54%
12284350326

Pull #9348

github

ziggie1984
github: update goveralls tool
Pull Request #9348: github: update goveralls tool

101901 of 177264 relevant lines covered (57.49%)

24841.21 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
// BitcoinMainNetParams contains parameters specific to the current Bitcoin
26
// mainnet.
27
var BitcoinMainNetParams = BitcoinNetParams{
28
        Params:   &bitcoinCfg.MainNetParams,
29
        RPCPort:  "8334",
30
        CoinType: keychain.CoinTypeBitcoin,
31
}
32

33
// BitcoinSimNetParams contains parameters specific to the simulation test
34
// network.
35
var BitcoinSimNetParams = BitcoinNetParams{
36
        Params:   &bitcoinCfg.SimNetParams,
37
        RPCPort:  "18556",
38
        CoinType: keychain.CoinTypeTestnet,
39
}
40

41
// BitcoinSigNetParams contains parameters specific to the signet test network.
42
var BitcoinSigNetParams = BitcoinNetParams{
43
        Params:   &bitcoinCfg.SigNetParams,
44
        RPCPort:  "38332",
45
        CoinType: keychain.CoinTypeTestnet,
46
}
47

48
// BitcoinRegTestNetParams contains parameters specific to a local bitcoin
49
// regtest network.
50
var BitcoinRegTestNetParams = BitcoinNetParams{
51
        Params:   &bitcoinCfg.RegressionNetParams,
52
        RPCPort:  "18334",
53
        CoinType: keychain.CoinTypeTestnet,
54
}
55

56
// IsTestnet tests if the givern params correspond to a testnet
57
// parameter configuration.
58
func IsTestnet(params *BitcoinNetParams) bool {
×
59
        return params.Params.Net == bitcoinWire.TestNet3
×
60
}
×
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