mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
not going into snap sync (#1247)
This commit is contained in:
parent
5f6a76bafe
commit
368a1a3859
1 changed files with 12 additions and 10 deletions
|
|
@ -172,17 +172,19 @@ func newHandler(config *handlerConfig) (*handler, error) {
|
||||||
// * the last snap sync is not finished while user specifies a full sync this
|
// * the last snap sync is not finished while user specifies a full sync this
|
||||||
// time. But we don't have any recent state for full sync.
|
// time. But we don't have any recent state for full sync.
|
||||||
// In these cases however it's safe to reenable snap sync.
|
// In these cases however it's safe to reenable snap sync.
|
||||||
fullBlock, snapBlock := h.chain.CurrentBlock(), h.chain.CurrentSnapBlock()
|
|
||||||
|
|
||||||
if fullBlock.Number.Uint64() == 0 && snapBlock.Number.Uint64() > 0 {
|
// TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss
|
||||||
h.snapSync.Store(true)
|
// fullBlock, snapBlock := h.chain.CurrentBlock(), h.chain.CurrentSnapBlock()
|
||||||
log.Warn("Switch sync mode from full sync to snap sync", "reason", "snap sync incomplete")
|
|
||||||
} else if !h.chain.HasState(fullBlock.Root) {
|
// TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss
|
||||||
// TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss
|
// For more info - https://github.com/ethereum/go-ethereum/pull/28171
|
||||||
// For more info - https://github.com/ethereum/go-ethereum/pull/28171
|
// if fullBlock.Number.Uint64() == 0 && snapBlock.Number.Uint64() > 0 {
|
||||||
// h.snapSync.Store(true)
|
// h.snapSync.Store(true)
|
||||||
log.Warn("Switch sync mode from full sync to snap sync", "reason", "head state missing")
|
// log.Warn("Switch sync mode from full sync to snap sync", "reason", "snap sync incomplete")
|
||||||
}
|
// } else if !h.chain.HasState(fullBlock.Root) {
|
||||||
|
// h.snapSync.Store(true)
|
||||||
|
// log.Warn("Switch sync mode from full sync to snap sync", "reason", "head state missing")
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
head := h.chain.CurrentBlock()
|
head := h.chain.CurrentBlock()
|
||||||
if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {
|
if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue