@@ -1341,7 +1341,7 @@ func (b *Batcher) monitorSpendAndNotify(ctx context.Context, sweeps []*sweep,
13411341
13421342// monitorConfAndNotify monitors the confirmation of a specific transaction and
13431343// writes the response back to the response channel. It is called if the batch
1344- // is reorg-safely confirmed and we just need to deliver the data back to the
1344+ // is reorg-safely confirmed, and we just need to deliver the data back to the
13451345// caller though SpendNotifier.
13461346func (b * Batcher ) monitorConfAndNotify (ctx context.Context , sweep * sweep ,
13471347 notifier * SpendNotifier , spendTx * wire.MsgTx ,
@@ -1354,9 +1354,8 @@ func (b *Batcher) monitorConfAndNotify(ctx context.Context, sweep *sweep,
13541354
13551355 batchTxid := spendTx .TxHash ()
13561356
1357- if len (spendTx .TxOut ) != 1 {
1358- return fmt .Errorf ("unexpected number of outputs in batch: %d, " +
1359- "want %d" , len (spendTx .TxOut ), 1 )
1357+ if len (spendTx .TxOut ) < 1 {
1358+ return fmt .Errorf ("expected at least one output in batch" )
13601359 }
13611360 batchPkScript := spendTx .TxOut [0 ].PkScript
13621361
@@ -1426,7 +1425,7 @@ func (b *Batcher) writeToErrChan(ctx context.Context, err error) {
14261425
14271426// convertSweep converts a fetched sweep from the database to a sweep that is
14281427// ready to be processed by the batcher. It loads swap from loopdb by calling
1429- // method FetchLoopOutSwap.
1428+ // the method FetchLoopOutSwap.
14301429func (b * Batcher ) convertSweep (ctx context.Context , dbSweep * dbSweep ) (
14311430 * sweep , error ) {
14321431
0 commit comments