mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
multi: rename HTLCExpiry
to MailboxDeliveryTimeout
for clarity
This commit is contained in:
parent
ae6006a84e
commit
851c82b80e
3 changed files with 21 additions and 19 deletions
|
@ -190,15 +190,17 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error)
|
|||
EpochChan: make(chan *chainntnfs.BlockEpoch),
|
||||
ConfChan: make(chan *chainntnfs.TxConfirmation),
|
||||
},
|
||||
FwdEventTicker: ticker.NewForce(DefaultFwdEventInterval),
|
||||
LogEventTicker: ticker.NewForce(DefaultLogInterval),
|
||||
AckEventTicker: ticker.NewForce(DefaultAckInterval),
|
||||
HtlcNotifier: &mockHTLCNotifier{},
|
||||
Clock: clock.NewDefaultClock(),
|
||||
HTLCExpiry: time.Hour,
|
||||
DustThreshold: DefaultDustThreshold,
|
||||
SignAliasUpdate: signAliasUpdate,
|
||||
IsAlias: isAlias,
|
||||
FwdEventTicker: ticker.NewForce(
|
||||
DefaultFwdEventInterval,
|
||||
),
|
||||
LogEventTicker: ticker.NewForce(DefaultLogInterval),
|
||||
AckEventTicker: ticker.NewForce(DefaultAckInterval),
|
||||
HtlcNotifier: &mockHTLCNotifier{},
|
||||
Clock: clock.NewDefaultClock(),
|
||||
MailboxDeliveryTimeout: time.Hour,
|
||||
DustThreshold: DefaultDustThreshold,
|
||||
SignAliasUpdate: signAliasUpdate,
|
||||
IsAlias: isAlias,
|
||||
}
|
||||
|
||||
return New(cfg, startingHeight)
|
||||
|
|
|
@ -39,9 +39,9 @@ const (
|
|||
// fails in a forwarding package.
|
||||
DefaultAckInterval = 15 * time.Second
|
||||
|
||||
// DefaultHTLCExpiry is the duration after which Adds will be cancelled
|
||||
// if they could not get added to an outgoing commitment.
|
||||
DefaultHTLCExpiry = time.Minute
|
||||
// DefaultMailboxDeliveryTimeout is the duration after which Adds will
|
||||
// be cancelled if they could not get added to an outgoing commitment.
|
||||
DefaultMailboxDeliveryTimeout = time.Minute
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -202,11 +202,11 @@ type Config struct {
|
|||
// Clock is a time source for the switch.
|
||||
Clock clock.Clock
|
||||
|
||||
// HTLCExpiry is the interval after which Adds will be cancelled if they
|
||||
// have not been yet been delivered to a link. The computed deadline
|
||||
// will expiry this long after the Adds are added to a mailbox via
|
||||
// AddPacket.
|
||||
HTLCExpiry time.Duration
|
||||
// MailboxDeliveryTimeout is the interval after which Adds will be
|
||||
// cancelled if they have not been yet been delivered to a link. The
|
||||
// computed deadline will expiry this long after the Adds are added to
|
||||
// a mailbox via AddPacket.
|
||||
MailboxDeliveryTimeout time.Duration
|
||||
|
||||
// DustThreshold is the threshold in milli-satoshis after which we'll
|
||||
// fail incoming or outgoing dust payments for a particular channel.
|
||||
|
@ -386,7 +386,7 @@ func New(cfg Config, currentHeight uint32) (*Switch, error) {
|
|||
s.mailOrchestrator = newMailOrchestrator(&mailOrchConfig{
|
||||
forwardPackets: s.ForwardPackets,
|
||||
clock: s.cfg.Clock,
|
||||
expiry: s.cfg.HTLCExpiry,
|
||||
expiry: s.cfg.MailboxDeliveryTimeout,
|
||||
failMailboxUpdate: s.failMailboxUpdate,
|
||||
})
|
||||
|
||||
|
|
|
@ -658,7 +658,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||
AllowCircularRoute: cfg.AllowCircularRoute,
|
||||
RejectHTLC: cfg.RejectHTLC,
|
||||
Clock: clock.NewDefaultClock(),
|
||||
HTLCExpiry: htlcswitch.DefaultHTLCExpiry,
|
||||
MailboxDeliveryTimeout: htlcswitch.DefaultMailboxDeliveryTimeout,
|
||||
DustThreshold: thresholdMSats,
|
||||
SignAliasUpdate: s.signAliasUpdate,
|
||||
IsAlias: aliasmgr.IsAlias,
|
||||
|
|
Loading…
Add table
Reference in a new issue