File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -1170,6 +1170,19 @@ func (t *TxPublisher) handleUnknownSpent(r *monitorRecord) {
1170
1170
"bumper, failing it now:\n %v" , r .requestID ,
1171
1171
inputTypeSummary (r .req .Inputs ))
1172
1172
1173
+ // Create a result that will be sent to the resultChan which is listened
1174
+ // by the caller.
1175
+ result := t .createUnknownSpentBumpResult (r )
1176
+
1177
+ // Notify the sweeper about this result in the end.
1178
+ t .handleResult (result )
1179
+ }
1180
+
1181
+ // createUnknownSpentBumpResult creates and returns a BumpResult given the
1182
+ // monitored record has unknown spends.
1183
+ func (t * TxPublisher ) createUnknownSpentBumpResult (
1184
+ r * monitorRecord ) * BumpResult {
1185
+
1173
1186
// Create a result that will be sent to the resultChan which is listened
1174
1187
// by the caller.
1175
1188
result := & BumpResult {
@@ -1208,10 +1221,7 @@ func (t *TxPublisher) handleUnknownSpent(r *monitorRecord) {
1208
1221
result .Event = TxFatal
1209
1222
result .Err = err
1210
1223
1211
- // Notify the sweeper about this result in the end.
1212
- t .handleResult (result )
1213
-
1214
- return
1224
+ return result
1215
1225
}
1216
1226
1217
1227
feeFunc = f
@@ -1234,8 +1244,7 @@ func (t *TxPublisher) handleUnknownSpent(r *monitorRecord) {
1234
1244
// Attach the new fee rate to be used for the next sweeping attempt.
1235
1245
result .FeeRate = feeFunc .FeeRate ()
1236
1246
1237
- // Notify the sweeper about this result in the end.
1238
- t .handleResult (result )
1247
+ return result
1239
1248
}
1240
1249
1241
1250
// createAndPublishTx creates a new tx with a higher fee rate and publishes it
You can’t perform that action at this time.
0 commit comments