File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
main/java/tech/pegasys/teku/beacon/sync/forward/multipeer
test/java/tech/pegasys/teku/beacon/sync/forward/multipeer Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public SafeFuture<BatchImportResult> importBatch(final Batch batch) {
89
89
if (lastBlockImportResult .isSuccessful ()) {
90
90
return BatchImportResult .IMPORTED_ALL_BLOCKS ;
91
91
} else if (lastBlockImportResult .hasFailedExecutingExecutionPayload ()) {
92
- return BatchImportResult .SERVICE_OFFLINE ;
92
+ return BatchImportResult .EXECUTION_CLIENT_OFFLINE ;
93
93
} else if (lastBlockImportResult .isDataNotAvailable ()) {
94
94
return BatchImportResult .DATA_NOT_AVAILABLE ;
95
95
}
@@ -145,7 +145,7 @@ private SafeFuture<BlockImportResult> importBlock(
145
145
public enum BatchImportResult {
146
146
IMPORTED_ALL_BLOCKS ,
147
147
IMPORT_FAILED ,
148
- SERVICE_OFFLINE ,
148
+ EXECUTION_CLIENT_OFFLINE ,
149
149
DATA_NOT_AVAILABLE ;
150
150
151
151
public boolean isFailure () {
Original file line number Diff line number Diff line change @@ -433,10 +433,10 @@ private void onImportComplete(
433
433
LOG .debug ("Marking batch {} as invalid because it extends from an invalid block" , batch );
434
434
batch .markAsInvalid ();
435
435
}
436
- } else if (result == BatchImportResult .SERVICE_OFFLINE
436
+ } else if (result == BatchImportResult .EXECUTION_CLIENT_OFFLINE
437
437
|| result == BatchImportResult .DATA_NOT_AVAILABLE ) {
438
438
if (!scheduledProgressSync ) {
439
- LOG .warn ("Unable to import blocks because execution client is offline." );
439
+ LOG .warn ("Unable to import blocks: {}" , result );
440
440
asyncRunner
441
441
.runAfterDelay (
442
442
() ->
Original file line number Diff line number Diff line change @@ -240,9 +240,9 @@ void shouldNotDisconnectPeersWhenServiceOffline() {
240
240
ignoreFuture (verify (blockImporter ).importBlock (block2 ));
241
241
verifyNoMoreInteractions (blockImporter );
242
242
243
- // Import failed due to service being offline
243
+ // Import failed due to execution being offline
244
244
importResult2 .complete (BlockImportResult .failedExecutionPayloadExecution (new Error ()));
245
- assertThat (result ).isCompletedWithValue (BatchImportResult .SERVICE_OFFLINE );
245
+ assertThat (result ).isCompletedWithValue (BatchImportResult .EXECUTION_CLIENT_OFFLINE );
246
246
verify (batch ).getSource ();
247
247
verify (syncSource , never ()).disconnectCleanly (any ());
248
248
Original file line number Diff line number Diff line change 21
21
import static org .mockito .Mockito .verifyNoInteractions ;
22
22
import static org .mockito .Mockito .verifyNoMoreInteractions ;
23
23
import static org .mockito .Mockito .when ;
24
+ import static tech .pegasys .teku .beacon .sync .forward .multipeer .BatchImporter .BatchImportResult .EXECUTION_CLIENT_OFFLINE ;
24
25
import static tech .pegasys .teku .beacon .sync .forward .multipeer .BatchImporter .BatchImportResult .IMPORTED_ALL_BLOCKS ;
25
26
import static tech .pegasys .teku .beacon .sync .forward .multipeer .BatchImporter .BatchImportResult .IMPORT_FAILED ;
26
- import static tech .pegasys .teku .beacon .sync .forward .multipeer .BatchImporter .BatchImportResult .SERVICE_OFFLINE ;
27
27
import static tech .pegasys .teku .beacon .sync .forward .multipeer .batches .BatchAssert .assertThatBatch ;
28
28
import static tech .pegasys .teku .beacon .sync .forward .multipeer .chains .TargetChainTestUtil .chainWith ;
29
29
import static tech .pegasys .teku .infrastructure .async .SafeFuture .completedFuture ;
@@ -939,7 +939,7 @@ void shouldPauseImportingWhenImportingServiceOffline() {
939
939
batch2 , chainBuilder .generateBlockAtSlot (batch2 .getFirstSlot ()).getBlock ());
940
940
941
941
// But then it turns out that a batch0 is not processed because importing is offline
942
- batches .getImportResult (batch0 ).complete (SERVICE_OFFLINE );
942
+ batches .getImportResult (batch0 ).complete (EXECUTION_CLIENT_OFFLINE );
943
943
944
944
// This shouldn't make batches invalid
945
945
batches .assertNotMarkedInvalid (batch0 );
You can’t perform that action at this time.
0 commit comments