mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
Remove unnecessary height check in sync. (think it was only there for tests)
This commit is contained in:
parent
9beb66a75e
commit
ee678b28d0
2 changed files with 2 additions and 3 deletions
|
@ -427,8 +427,7 @@ impl NetToChainAdapter {
|
||||||
// We are out of consensus at this point and want to track the problem
|
// We are out of consensus at this point and want to track the problem
|
||||||
// down as soon as possible.
|
// down as soon as possible.
|
||||||
// Skip this if we are currently syncing (too slow).
|
// Skip this if we are currently syncing (too slow).
|
||||||
if chain.head().unwrap().height > 0
|
if chain.head().unwrap().height > 0 && !self.currently_syncing.load(Ordering::Relaxed)
|
||||||
&& !self.currently_syncing.load(Ordering::Relaxed)
|
|
||||||
&& self.config.chain_validation_mode == ChainValidationMode::EveryBlock
|
&& self.config.chain_validation_mode == ChainValidationMode::EveryBlock
|
||||||
{
|
{
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
|
@ -67,7 +67,7 @@ pub fn run_sync(
|
||||||
// in archival nodes (no fast sync) we just consider we have the whole
|
// in archival nodes (no fast sync) we just consider we have the whole
|
||||||
// state already
|
// state already
|
||||||
let have_txhashset = !fast_sync
|
let have_txhashset = !fast_sync
|
||||||
|| head.height > 0 && header_head.height.saturating_sub(head.height) <= horizon;
|
|| header_head.height.saturating_sub(head.height) <= horizon;
|
||||||
|
|
||||||
let mut syncing = needs_syncing(
|
let mut syncing = needs_syncing(
|
||||||
currently_syncing.as_ref(),
|
currently_syncing.as_ref(),
|
||||||
|
|
Loading…
Reference in a new issue