@@ -1267,7 +1267,7 @@ func (s *UtxoSweeper) handleNewInput(input *sweepInputMessage) error {
1267
1267
)
1268
1268
if err != nil {
1269
1269
err := fmt .Errorf ("wait for spend: %w" , err )
1270
- s .markInputFatal (pi , err )
1270
+ s .markInputFatal (pi , nil , err )
1271
1271
1272
1272
return err
1273
1273
}
@@ -1482,12 +1482,17 @@ func (s *UtxoSweeper) markInputsSwept(tx *wire.MsgTx, isOurTx bool) {
1482
1482
1483
1483
// markInputFatal marks the given input as fatal and won't be retried. It
1484
1484
// will also notify all the subscribers of this input.
1485
- func (s * UtxoSweeper ) markInputFatal (pi * SweeperInput , err error ) {
1485
+ func (s * UtxoSweeper ) markInputFatal (pi * SweeperInput , tx * wire.MsgTx ,
1486
+ err error ) {
1487
+
1486
1488
log .Errorf ("Failed to sweep input: %v, error: %v" , pi , err )
1487
1489
1488
1490
pi .state = Fatal
1489
1491
1490
- s .signalResult (pi , Result {Err : err })
1492
+ s .signalResult (pi , Result {
1493
+ Tx : tx ,
1494
+ Err : err ,
1495
+ })
1491
1496
}
1492
1497
1493
1498
// updateSweeperInputs updates the sweeper's internal state and returns a map
@@ -1819,7 +1824,7 @@ func (s *UtxoSweeper) markInputsFatal(set InputSet, err error) {
1819
1824
continue
1820
1825
}
1821
1826
1822
- s .markInputFatal (input , err )
1827
+ s .markInputFatal (input , nil , err )
1823
1828
}
1824
1829
}
1825
1830
@@ -1932,7 +1937,7 @@ func (s *UtxoSweeper) handleUnknownSpendTx(inp *SweeperInput, tx *wire.MsgTx) {
1932
1937
1933
1938
// Since the input is spent by others, we now mark it as fatal and won't
1934
1939
// be retried.
1935
- s .markInputFatal (inp , ErrRemoteSpend )
1940
+ s .markInputFatal (inp , tx , ErrRemoteSpend )
1936
1941
1937
1942
log .Debugf ("Removing descendant txns invalidated by (txid=%v): %v" ,
1938
1943
txid , lnutils .SpewLogClosure (tx ))
0 commit comments