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

lightningnetwork / lnd / 13535893188

26 Feb 2025 03:23AM UTC coverage: 57.502% (-1.3%) from 58.835%
13535893188

Pull #8453

github

Roasbeef
peer: update chooseDeliveryScript to gen script if needed

In this commit, we update `chooseDeliveryScript` to generate a new
script if needed. This allows us to fold in a few other lines that
always followed this function into this expanded function.

The tests have been updated accordingly.
Pull Request #8453: [4/4] - multi: integrate new rbf coop close FSM into the existing peer flow

280 of 1318 new or added lines in 22 files covered. (21.24%)

19475 existing lines in 254 files now uncovered.

103929 of 180740 relevant lines covered (57.5%)

24705.38 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.
UNCOV
58
func IsTestnet(params *BitcoinNetParams) bool {
×
UNCOV
59
        return params.Params.Net == bitcoinWire.TestNet3
×
UNCOV
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