Add is_optimistic to eth/v1/node/syncing response (#3374)

## Issue Addressed

As specified in the [Beacon Chain API specs](https://github.com/ethereum/beacon-APIs/blob/master/apis/node/syncing.yaml#L32-L35) we should return `is_optimistic` as part of the response to a query for the `eth/v1/node/syncing` endpoint.

## Proposed Changes

Compute the optimistic status of the head and add it to the `SyncingData` response.
This commit is contained in:
Mac L
2022-07-26 08:50:16 +00:00
parent 904dd62524
commit d316305411
3 changed files with 7 additions and 0 deletions

View File

@@ -1281,6 +1281,7 @@ impl ApiTester {
let expected = SyncingData {
is_syncing: false,
is_optimistic: false,
head_slot,
sync_distance,
};