mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
triedb: Snapshot completed
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
2f90e8a3da
commit
485d1b136f
2 changed files with 14 additions and 0 deletions
|
|
@ -375,3 +375,12 @@ func (db *Database) IsVerkle() bool {
|
|||
func (db *Database) Disk() ethdb.Database {
|
||||
return db.disk
|
||||
}
|
||||
|
||||
// SnapshotCompleted returns the indicator if the snapshot is completed.
|
||||
func (db *Database) SnapshotCompleted() bool {
|
||||
pdb, ok := db.backend.(*pathdb.Database)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return pdb.SnapshotCompleted()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -681,3 +681,8 @@ func (db *Database) StorageIterator(root common.Hash, account common.Hash, seek
|
|||
}
|
||||
return newFastStorageIterator(db, root, account, seek)
|
||||
}
|
||||
|
||||
// SnapshotCompleted returns the indicator if the snapshot generation is completed.
|
||||
func (db *Database) SnapshotCompleted() bool {
|
||||
return !db.waitSync && db.tree.bottom().genComplete()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue