mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Do not request a full block for invalid compact block during syncing (#1002)
This commit is contained in:
parent
06883e94e9
commit
a638bd7499
1 changed files with 14 additions and 6 deletions
|
@ -157,12 +157,20 @@ impl p2p::ChainAdapter for NetToChainAdapter {
|
|||
debug!(LOGGER, "adapter: successfully hydrated block from tx pool!");
|
||||
self.process_block(block, addr)
|
||||
} else {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"adapter: block invalid after hydration, requesting full block"
|
||||
);
|
||||
self.request_block(&cb.header, &addr);
|
||||
true
|
||||
if self.sync_state.status() == SyncStatus::NoSync {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"adapter: block invalid after hydration, requesting full block"
|
||||
);
|
||||
self.request_block(&cb.header, &addr);
|
||||
true
|
||||
} else {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"adapter: block invalid after hydration, ignoring it, cause still syncing"
|
||||
);
|
||||
true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug!(
|
||||
|
|
Loading…
Reference in a new issue