diff --git a/beacon_chain/sync/sync_protocol.nim b/beacon_chain/sync/sync_protocol.nim index 63642e88a..898172729 100644 --- a/beacon_chain/sync/sync_protocol.nim +++ b/beacon_chain/sync/sync_protocol.nim @@ -135,6 +135,8 @@ proc readChunkPayload*( return neterr InvalidContextBytes if res.isErr: return err(res.error) + if stateFork != peer.network.cfg.stateForkAtEpoch(res.get.contextEpoch): + return neterr InvalidContextBytes return ok res.get func shortLog*(s: StatusMsg): auto =