mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-14 12:43:03 +02:00
sidecar: clean old shims for orders in current batch
This commit is contained in:
parent
5cca100b03
commit
d2cd76a65e
1 changed files with 7 additions and 0 deletions
|
|
@ -601,6 +601,13 @@ func (a *SidecarAcceptor) matchPrepare(pendingBatch *order.Batch,
|
|||
sdcrLog.Infof("Received PrepareMsg for batch=%x, num_orders=%v",
|
||||
batch.ID[:], len(batch.MatchedOrders))
|
||||
|
||||
// Ensure that we do not have any registered shims for the orders
|
||||
// in this batch. This is not supposed to happen but we have a bug.
|
||||
if err = a.removeShims(batch); err != nil {
|
||||
return nil, fmt.Errorf("unable to cleanup shims before start "+
|
||||
"preparing the current batch: %v", err)
|
||||
}
|
||||
|
||||
// If there is still a pending batch around from a previous iteration,
|
||||
// we need to clean up the pending channels first.
|
||||
if pendingBatch != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue