mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 19:33:31 +02:00
This commit makes the call to forwardBatch after locking in Adds synchronous. This ensures that circuits for any Add packets are added to the switch in the same order that they are prescribed in the channel state. Though it is very unlikely this case would arise, it may happen under more greater loads. In addition, this also makes some trivial optimizations wrt. to not spawning unnecessary goroutines if no settle/fail packets are locked in.