forked from cerc-io/plugeth
core/state, light, les: make signature of ContractCode hash-independent (#27209)
* core/state, light, les: make signature of ContractCode hash-independent * push current state for feedback * les: fix unit test * core, les, light: fix les unittests * core/state, trie, les, light: fix state iterator * core, les: address comments * les: fix lint --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This commit is contained in:
co-authored by
Gary Rong
parent
85b8d1c06c
commit
8bbb16b70e
@@ -168,10 +168,15 @@ func (db *Database) Scheme() string {
|
||||
// It is meant to be called when closing the blockchain object, so that all
|
||||
// resources held can be released correctly.
|
||||
func (db *Database) Close() error {
|
||||
db.WritePreimages()
|
||||
return db.backend.Close()
|
||||
}
|
||||
|
||||
// WritePreimages flushes all accumulated preimages to disk forcibly.
|
||||
func (db *Database) WritePreimages() {
|
||||
if db.preimages != nil {
|
||||
db.preimages.commit(true)
|
||||
}
|
||||
return db.backend.Close()
|
||||
}
|
||||
|
||||
// saveCache saves clean state cache to given directory path
|
||||
|
||||
Reference in New Issue
Block a user