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