From 3784c6caee5238e727b1fa17cefabc7c70c1aebc Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Mon, 11 Mar 2024 23:28:30 +0800 Subject: [PATCH] core: extend code comment --- core/blockchain.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index eed828f1e0..55da62132e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -760,8 +760,10 @@ func (bc *BlockChain) rewindPathHead(root common.Hash) (*types.Header, uint64) { // block as the new head block. // // If the given root is not empty, then the rewind should attempt to pass the specified -// state root and return the associated block number as well. If the root is deemed -// impossible to pass, 0 is returned. +// state root and return the associated block number as well. If the root, typically +// representing the state corresponding to snapshot disk layer, is deemed impassable, +// then block number zero is returned, indicating that snapshot recovery is disabled +// and the whole snapshot should be auto-generated in case of head mismatch. func (bc *BlockChain) rewindHead(root common.Hash) (*types.Header, uint64) { if bc.triedb.Scheme() == rawdb.PathScheme { return bc.rewindPathHead(root)