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

lightningnetwork / lnd / 15754665794

19 Jun 2025 09:36AM UTC coverage: 68.186% (+0.03%) from 68.161%
15754665794

Pull #9880

github

web-flow
Merge bdc6e10a2 into e0a9705d5
Pull Request #9880: Improve access control in peer connections

201 of 249 new or added lines in 7 files covered. (80.72%)

75 existing lines in 24 files now uncovered.

134637 of 197455 relevant lines covered (68.19%)

22116.57 hits per line

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

14.29
/lncfg/dev.go
1
//go:build !integration
2

3
package lncfg
4

5
import (
6
        "time"
7

8
        "github.com/lightningnetwork/lnd/lnwallet/chanfunding"
9
)
10

11
// IsDevBuild returns a bool to indicate whether we are in a development
12
// environment.
13
//
14
// NOTE: always return false here.
15
func IsDevBuild() bool {
25✔
16
        return false
25✔
17
}
25✔
18

19
// DevConfig specifies development configs used for production. This struct
20
// should always remain empty.
21
type DevConfig struct{}
22

23
// ChannelReadyWait returns the config value, which is always 0 for production
24
// build.
25
func (d *DevConfig) ChannelReadyWait() time.Duration {
×
26
        return 0
×
27
}
×
28

29
// GetUnsafeDisconnect returns the config value, which is always true for
30
// production build.
31
//
32
// TODO(yy): this is a temporary solution to allow users to reconnect peers to
33
// trigger a reestablishiment for the active channels. Once a new dedicated RPC
34
// is added to realize that functionality, this function should return false to
35
// forbidden disconnecting peers while there are active channels.
36
func (d *DevConfig) GetUnsafeDisconnect() bool {
×
37
        return true
×
38
}
×
39

40
// GetReservationTimeout returns the config value for `ReservationTimeout`.
41
func (d *DevConfig) GetReservationTimeout() time.Duration {
×
42
        return chanfunding.DefaultReservationTimeout
×
43
}
×
44

45
// GetZombieSweeperInterval returns the config value for`ZombieSweeperInterval`.
46
func (d *DevConfig) GetZombieSweeperInterval() time.Duration {
×
47
        return DefaultZombieSweeperInterval
×
48
}
×
49

50
// GetMaxWaitNumBlocksFundingConf returns the config value for
51
// `MaxWaitNumBlocksFundingConf`.
52
func (d *DevConfig) GetMaxWaitNumBlocksFundingConf() uint32 {
×
53
        return DefaultMaxWaitNumBlocksFundingConf
×
54
}
×
55

56
// GetUnsafeConnect returns the config value `UnsafeConnect`, which is always
57
// false for production build.
NEW
58
func (d *DevConfig) GetUnsafeConnect() bool {
×
NEW
59
        return false
×
NEW
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