mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
core: fix comments
This commit is contained in:
parent
282aa6be0f
commit
f78f04a604
2 changed files with 2 additions and 7 deletions
|
|
@ -1033,9 +1033,7 @@ func (bc *BlockChain) setHeadBeyondRoot(head uint64, time uint64, root common.Ha
|
||||||
|
|
||||||
// Note, the located head state might not be physically present yet; in
|
// Note, the located head state might not be physically present yet; in
|
||||||
// the path-based scheme a recoverable state is materialized in a single
|
// the path-based scheme a recoverable state is materialized in a single
|
||||||
// shot once the rewind is finalized (see below). The stateless-head
|
// shot once the rewind is finalized.
|
||||||
// handling is therefore deferred until then, also avoiding a per-block
|
|
||||||
// recoverability check whose cost would grow as the rewind goes deeper.
|
|
||||||
}
|
}
|
||||||
// Rewind the snap block in a simpleton way to the target head
|
// Rewind the snap block in a simpleton way to the target head
|
||||||
if currentSnapBlock := bc.CurrentSnapBlock(); currentSnapBlock != nil && header.Number.Uint64() < currentSnapBlock.Number.Uint64() {
|
if currentSnapBlock := bc.CurrentSnapBlock(); currentSnapBlock != nil && header.Number.Uint64() < currentSnapBlock.Number.Uint64() {
|
||||||
|
|
|
||||||
|
|
@ -408,10 +408,7 @@ func (bc *BlockChain) stateRecoverable(root common.Hash) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// StateRecoverable checks if the specified state is recoverable by applying
|
// StateRecoverable checks if the specified state is recoverable by applying
|
||||||
// state histories on top of the persistent state. It's the exported variant
|
// state histories on top of the persistent state.
|
||||||
// of stateRecoverable, and shares the same semantics: it's only meaningful for
|
|
||||||
// the path scheme, and returns false if the state is already available or the
|
|
||||||
// hash scheme is used.
|
|
||||||
func (bc *BlockChain) StateRecoverable(root common.Hash) bool {
|
func (bc *BlockChain) StateRecoverable(root common.Hash) bool {
|
||||||
return bc.stateRecoverable(root)
|
return bc.stateRecoverable(root)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue