htlcswitch+peer: remove fwd pkgs once before tick, bump timer to 1hr
This commit changes the logic when garbage collecting forwarding packages such that they are removed once when the function is called, and then again upon subsequent ticks. This allows us to bump the peer timer to 1 hour to limit the number of db transactions happening in lnd. The forwarding packages need to be removed initially as otherwise a flappy node will never have them garbage collected.
This commit is contained in:
1 parent
62e19185f1
commit
ea467783e9
2 files changed
+34
-18
No files matched your search
+1
-1
@@ -588,7 +588,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
||||
OnChannelFailure: onChannelFailure,
|
||||
SyncStates: syncStates,
|
||||
BatchTicker: ticker.New(50 * time.Millisecond),
|
||||
FwdPkgGCTicker: ticker.New(time.Minute),
|
||||
FwdPkgGCTicker: ticker.New(time.Hour),
|
||||
PendingCommitTicker: ticker.New(time.Minute),
|
||||
BatchSize: 10,
|
||||
UnsafeReplay: p.cfg.UnsafeReplay,
|
||||
|
||||
Reference in new issue
Block a user