mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
Still need to check if syncing before asking for orphan parent
This commit is contained in:
parent
7047930b68
commit
22106693f3
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ impl NetToChainAdapter {
|
||||||
Ok(_) => true,
|
Ok(_) => true,
|
||||||
Err(chain::Error::Orphan) => {
|
Err(chain::Error::Orphan) => {
|
||||||
// make sure we did not miss the parent block
|
// make sure we did not miss the parent block
|
||||||
if !chain.is_orphan(&prev_hash) {
|
if !chain.is_orphan(&prev_hash) && !self.currently_syncing.load(Ordering::Relaxed) {
|
||||||
if let Err(_) = chain.get_block_header(&prev_hash) {
|
if let Err(_) = chain.get_block_header(&prev_hash) {
|
||||||
debug!(LOGGER, "adapter: process_block: received an orphan block, checking the parent: {:}", prev_hash);
|
debug!(LOGGER, "adapter: process_block: received an orphan block, checking the parent: {:}", prev_hash);
|
||||||
self.request_block_by_hash(prev_hash, &addr)
|
self.request_block_by_hash(prev_hash, &addr)
|
||||||
|
|
Loading…
Reference in a new issue