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

lightningnetwork / lnd / 13582876201

27 Feb 2025 08:50PM UTC coverage: 58.854% (+0.08%) from 58.77%
13582876201

Pull #9562

github

NishantBansal2003
multi: Add itest for funding timeout

This commit adds an integration test that
verifies the funding timeout behavior in the
funding manager, in dev/integration test.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
Pull Request #9562: Make MaxWaitNumBlocksFundingConf Configurable for itest

31 of 34 new or added lines in 5 files covered. (91.18%)

60 existing lines in 11 files now uncovered.

136487 of 231906 relevant lines covered (58.85%)

19244.29 hits per line

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

16.67
/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`.
NEW
52
func (d *DevConfig) GetMaxWaitNumBlocksFundingConf() int {
×
NEW
53
        return DefaultMaxWaitNumBlocksFundingConf
×
NEW
54
}
×
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