Restore backwards compatibility when using older BNs (#3410)

## Issue Addressed

https://github.com/status-im/nimbus-eth2/issues/3930

## Proposed Changes

We can trivially support beacon nodes which do not provide the `is_optimistic` field by wrapping the field in an `Option`.
This commit is contained in:
Mac L
2022-08-02 23:20:51 +00:00
parent d0beecca20
commit e24552d61a
3 changed files with 3 additions and 3 deletions

View File

@@ -552,7 +552,7 @@ pub struct VersionData {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SyncingData {
pub is_syncing: bool,
pub is_optimistic: bool,
pub is_optimistic: Option<bool>,
pub head_slot: Slot,
pub sync_distance: Slot,
}