mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +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!");
|
debug!(LOGGER, "adapter: successfully hydrated block from tx pool!");
|
||||||
self.process_block(block, addr)
|
self.process_block(block, addr)
|
||||||
} else {
|
} else {
|
||||||
|
if self.sync_state.status() == SyncStatus::NoSync {
|
||||||
debug!(
|
debug!(
|
||||||
LOGGER,
|
LOGGER,
|
||||||
"adapter: block invalid after hydration, requesting full block"
|
"adapter: block invalid after hydration, requesting full block"
|
||||||
);
|
);
|
||||||
self.request_block(&cb.header, &addr);
|
self.request_block(&cb.header, &addr);
|
||||||
true
|
true
|
||||||
|
} else {
|
||||||
|
debug!(
|
||||||
|
LOGGER,
|
||||||
|
"adapter: block invalid after hydration, ignoring it, cause still syncing"
|
||||||
|
);
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debug!(
|
debug!(
|
||||||
|
|
Loading…
Reference in a new issue