loopd: make maximum number of payment parts configurable

This commit is contained in:
Joost Jager 2020-04-27 14:06:08 +02:00
parent 5588876b48
commit 12ae3d6a40
No known key found for this signature in database
GPG key ID: A61B9D4C393C59C7
4 changed files with 35 additions and 27 deletions

View file

@ -22,6 +22,8 @@ type executorConfig struct {
store loopdb.SwapStore
createExpiryTimer func(expiry time.Duration) <-chan time.Time
loopOutMaxParts uint32
}
// executor is responsible for executing swaps.
@ -109,10 +111,11 @@ func (s *executor) run(mainCtx context.Context,
defer s.wg.Done()
newSwap.execute(mainCtx, &executeConfig{
statusChan: statusChan,
sweeper: s.sweeper,
blockEpochChan: queue.ChanOut(),
timerFactory: s.executorConfig.createExpiryTimer,
statusChan: statusChan,
sweeper: s.sweeper,
blockEpochChan: queue.ChanOut(),
timerFactory: s.executorConfig.createExpiryTimer,
loopOutMaxParts: s.executorConfig.loopOutMaxParts,
}, height)
select {