diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index 4ac68388c..9a542ea2b 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -234,11 +234,17 @@ impl Eth for EthClient let status = take_weak!(self.sync).status(); let res = match status.state { SyncState::Idle => SyncStatus::None, - SyncState::Waiting | SyncState::Blocks | SyncState::NewBlocks | SyncState::ChainHead => SyncStatus::Info(SyncInfo { - starting_block: U256::from(status.start_block_number), - current_block: U256::from(take_weak!(self.client).chain_info().best_block_number), - highest_block: U256::from(status.highest_block_number.unwrap_or(status.start_block_number)) - }) + SyncState::Waiting | SyncState::Blocks | SyncState::NewBlocks | SyncState::ChainHead => { + let info = SyncInfo { + starting_block: U256::from(status.start_block_number), + current_block: U256::from(take_weak!(self.client).chain_info().best_block_number), + highest_block: U256::from(status.highest_block_number.unwrap_or(status.start_block_number)) + }; + match info.highest_block > info.starting_block + U256::from(6) { + true => SyncStatus::Info(info), + false => SyncStatus::None, + } + } }; to_value(&res) }