@@ -215,21 +215,21 @@ func TestMarkInputsPublishFailed(t *testing.T) {
215
215
// published.
216
216
// - inputSwept specifies an input that's swept.
217
217
// - inputExcluded specifies an input that's excluded.
218
- // - inputFailed specifies an input that's failed .
218
+ // - inputFatal specifies an input that's fatal .
219
219
var (
220
220
inputInit = createMockInput (t , s , Init )
221
221
inputPendingPublish = createMockInput (t , s , PendingPublish )
222
222
inputPublished = createMockInput (t , s , Published )
223
223
inputPublishFailed = createMockInput (t , s , PublishFailed )
224
224
inputSwept = createMockInput (t , s , Swept )
225
225
inputExcluded = createMockInput (t , s , Excluded )
226
- inputFailed = createMockInput (t , s , Failed )
226
+ inputFatal = createMockInput (t , s , Fatal )
227
227
)
228
228
229
229
// Gather all inputs.
230
230
set .On ("Inputs" ).Return ([]input.Input {
231
231
inputInit , inputPendingPublish , inputPublished ,
232
- inputPublishFailed , inputSwept , inputExcluded , inputFailed ,
232
+ inputPublishFailed , inputSwept , inputExcluded , inputFatal ,
233
233
})
234
234
235
235
// Mark the test inputs. We expect the non-exist input and the
@@ -264,7 +264,7 @@ func TestMarkInputsPublishFailed(t *testing.T) {
264
264
require .Equal (Excluded , s .inputs [inputExcluded .OutPoint ()].state )
265
265
266
266
// We expect the failed input to stay unchanged.
267
- require .Equal (Failed , s .inputs [inputFailed .OutPoint ()].state )
267
+ require .Equal (Fatal , s .inputs [inputFatal .OutPoint ()].state )
268
268
269
269
// Assert mocked statements are executed as expected.
270
270
mockStore .AssertExpectations (t )
@@ -437,7 +437,7 @@ func TestUpdateSweeperInputs(t *testing.T) {
437
437
// These inputs won't hit RequiredLockTime so we won't mock.
438
438
input4 := & SweeperInput {state : Swept , Input : inp1 }
439
439
input5 := & SweeperInput {state : Excluded , Input : inp1 }
440
- input6 := & SweeperInput {state : Failed , Input : inp1 }
440
+ input6 := & SweeperInput {state : Fatal , Input : inp1 }
441
441
442
442
// Mock the input to have a locktime in the future so it will NOT be
443
443
// returned.
@@ -575,7 +575,7 @@ func TestDecideStateAndRBFInfo(t *testing.T) {
575
575
require .Equal (Published , state )
576
576
}
577
577
578
- // TestMarkInputFailed checks that the input is marked as failed as expected.
578
+ // TestMarkInputFatal checks that the input is marked as expected.
579
579
func TestMarkInputFailed (t * testing.T ) {
580
580
t .Parallel ()
581
581
@@ -596,10 +596,10 @@ func TestMarkInputFailed(t *testing.T) {
596
596
}
597
597
598
598
// Call the method under test.
599
- s .markInputFailed (pi , errors .New ("dummy error" ))
599
+ s .markInputFatal (pi , errors .New ("dummy error" ))
600
600
601
601
// Assert the state is updated.
602
- require .Equal (t , Failed , pi .state )
602
+ require .Equal (t , Fatal , pi .state )
603
603
}
604
604
605
605
// TestSweepPendingInputs checks that `sweepPendingInputs` correctly executes
@@ -1102,41 +1102,41 @@ func TestMarkInputsFailed(t *testing.T) {
1102
1102
// published.
1103
1103
// - inputSwept specifies an input that's swept.
1104
1104
// - inputExcluded specifies an input that's excluded.
1105
- // - inputFailed specifies an input that's failed .
1105
+ // - inputFatal specifies an input that's fatal .
1106
1106
var (
1107
1107
inputInit = createMockInput (t , s , Init )
1108
1108
inputPendingPublish = createMockInput (t , s , PendingPublish )
1109
1109
inputPublished = createMockInput (t , s , Published )
1110
1110
inputPublishFailed = createMockInput (t , s , PublishFailed )
1111
1111
inputSwept = createMockInput (t , s , Swept )
1112
1112
inputExcluded = createMockInput (t , s , Excluded )
1113
- inputFailed = createMockInput (t , s , Failed )
1113
+ inputFatal = createMockInput (t , s , Fatal )
1114
1114
)
1115
1115
1116
1116
// Gather all inputs.
1117
1117
set .On ("Inputs" ).Return ([]input.Input {
1118
1118
inputInit , inputPendingPublish , inputPublished ,
1119
- inputPublishFailed , inputSwept , inputExcluded , inputFailed ,
1119
+ inputPublishFailed , inputSwept , inputExcluded , inputFatal ,
1120
1120
})
1121
1121
1122
1122
// Mark the test inputs. We expect the non-exist input and
1123
- // inputSwept/inputExcluded/inputFailed to be skipped.
1124
- s .markInputsFailed (set , errDummy )
1123
+ // inputSwept/inputExcluded/inputFatal to be skipped.
1124
+ s .markInputsFatal (set , errDummy )
1125
1125
1126
1126
// We expect unchanged number of pending inputs.
1127
1127
require .Len (s .inputs , 7 )
1128
1128
1129
- // We expect the init input's to be marked as failed .
1130
- require .Equal (Failed , s .inputs [inputInit .OutPoint ()].state )
1129
+ // We expect the init input's to be marked as fatal .
1130
+ require .Equal (Fatal , s .inputs [inputInit .OutPoint ()].state )
1131
1131
1132
1132
// We expect the pending-publish input to be marked as failed.
1133
- require .Equal (Failed , s .inputs [inputPendingPublish .OutPoint ()].state )
1133
+ require .Equal (Fatal , s .inputs [inputPendingPublish .OutPoint ()].state )
1134
1134
1135
- // We expect the published input to be marked as failed .
1136
- require .Equal (Failed , s .inputs [inputPublished .OutPoint ()].state )
1135
+ // We expect the published input to be marked as fatal .
1136
+ require .Equal (Fatal , s .inputs [inputPublished .OutPoint ()].state )
1137
1137
1138
1138
// We expect the publish failed input to be markd as failed.
1139
- require .Equal (Failed , s .inputs [inputPublishFailed .OutPoint ()].state )
1139
+ require .Equal (Fatal , s .inputs [inputPublishFailed .OutPoint ()].state )
1140
1140
1141
1141
// We expect the swept input to stay unchanged.
1142
1142
require .Equal (Swept , s .inputs [inputSwept .OutPoint ()].state )
@@ -1145,7 +1145,7 @@ func TestMarkInputsFailed(t *testing.T) {
1145
1145
require .Equal (Excluded , s .inputs [inputExcluded .OutPoint ()].state )
1146
1146
1147
1147
// We expect the failed input to stay unchanged.
1148
- require .Equal (Failed , s .inputs [inputFailed .OutPoint ()].state )
1148
+ require .Equal (Fatal , s .inputs [inputFatal .OutPoint ()].state )
1149
1149
}
1150
1150
1151
1151
// TestHandleBumpEventTxFatal checks that `handleBumpEventTxFatal` correctly
0 commit comments