message: Consider sync done if we've downloaded a very recent block.
diff: @@ -47,7 +47,9 @@ use super::{
  };
  use crate::{
  effect::{EffectBuilder, EffectExt, EffectOptionExt, Effects},
  - types::{ActivationPoint, Block, BlockByHeight, BlockHash, Chainspec, FinalizedBlock},
  + types::{
  + ActivationPoint, Block, BlockByHeight, BlockHash, Chainspec, FinalizedBlock,
  + },
  NodeRng,
  };
  use event::BlockByHeightResult;
  @@ -264,6 +266,9 @@ impl<I: Clone + PartialEq + 'static> LinearChainSync<I> {
  **latest_block, block,
  "Block execution result doesn't match received block."
  );
  + if self.is_chain_end(&block) {
  + self.mark_done();
  + }
  match block.header().next_era_validator_weights() {
  None => (),
  Some(validators_for_next_era) => {
  @@ -276,6 +281,12 @@ impl<I: Clone + PartialEq + 'static> LinearChainSync<I> {
  }
  }
  + /// Returns whether `block` can be considered tip of the chain.
  + fn is_chain_end(&self, block: &Block) -> bool {
  + let acceptable_drift_millis = 5000;
  + block.header().timestamp().elapsed().millis() <= acceptable_drift_millis
  + }
  +
  /// Returns effects for fetching next block's deploys.
  fn fetch_next_block_deploys<REv>(
  &mut self,
  