multi: Add itest for a failed funding flow.
This adds an itest for a failed funding flow by our peer.
This commit is contained in:
7 files changed
+122
-4
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -67,6 +68,14 @@ const (
|
||||
// peer and a block arriving during that round trip to trigger force
|
||||
// closure.
|
||||
DefaultOutgoingCltvRejectDelta = DefaultOutgoingBroadcastDelta + 3
|
||||
|
||||
// DefaultReservationTimeout is the default time we wait until we remove
|
||||
// an unfinished (zombiestate) open channel flow from memory.
|
||||
DefaultReservationTimeout = 10 * time.Minute
|
||||
|
||||
// DefaultZombieSweeperInterval is the default time interval at which
|
||||
// unfinished (zombiestate) open channel flows are purged from memory.
|
||||
DefaultZombieSweeperInterval = 1 * time.Minute
|
||||
)
|
||||
|
||||
// CleanAndExpandPath expands environment variables and leading ~ in the
|
||||
|
||||
+13
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
package lncfg
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// IsDevBuild returns a bool to indicate whether we are in a development
|
||||
// environment.
|
||||
@@ -21,3 +23,13 @@ type DevConfig struct{}
|
||||
func (d *DevConfig) ChannelReadyWait() time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
||||
// GetReservationTimeout returns the config value for `ReservationTimeout`.
|
||||
func (d *DevConfig) GetReservationTimeout() time.Duration {
|
||||
return DefaultReservationTimeout
|
||||
}
|
||||
|
||||
// GetZombieSweeperInterval returns the config value for`ZombieSweeperInterval`.
|
||||
func (d *DevConfig) GetZombieSweeperInterval() time.Duration {
|
||||
return DefaultZombieSweeperInterval
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
package lncfg
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// IsDevBuild returns a bool to indicate whether we are in a development
|
||||
// environment.
|
||||
@@ -18,9 +20,29 @@ func IsDevBuild() bool {
|
||||
//nolint:lll
|
||||
type DevConfig struct {
|
||||
ProcessChannelReadyWait time.Duration `long:"processchannelreadywait" description:"Time to sleep before processing remote node's channel_ready message."`
|
||||
ReservationTimeout time.Duration `long:"reservationtimeout" description:"The maximum time we keep a pending channel open flow in memory."`
|
||||
ZombieSweeperInterval time.Duration `long:"zombiesweeperinterval" description:"The time interval at which channel opening flows are evaluated for zombie status."`
|
||||
}
|
||||
|
||||
// ChannelReadyWait returns the config value `ProcessChannelReadyWait`.
|
||||
func (d *DevConfig) ChannelReadyWait() time.Duration {
|
||||
return d.ProcessChannelReadyWait
|
||||
}
|
||||
|
||||
// GetReservationTimeout returns the config value for `ReservationTimeout`.
|
||||
func (d *DevConfig) GetReservationTimeout() time.Duration {
|
||||
if d.ReservationTimeout == 0 {
|
||||
return DefaultReservationTimeout
|
||||
}
|
||||
|
||||
return d.ReservationTimeout
|
||||
}
|
||||
|
||||
// GetZombieSweeperInterval returns the config value for`ZombieSweeperInterval`.
|
||||
func (d *DevConfig) GetZombieSweeperInterval() time.Duration {
|
||||
if d.ZombieSweeperInterval == 0 {
|
||||
return DefaultZombieSweeperInterval
|
||||
}
|
||||
|
||||
return d.ZombieSweeperInterval
|
||||
}
|
||||
Reference in new issue
Block a user