File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -250,11 +250,11 @@ func (t *StateTrie) Witness() map[string]struct{} {
250250func (t * StateTrie ) Commit (collectLeaf bool ) (common.Hash , * trienode.NodeSet ) {
251251 // Write all the pre-images to the actual disk database
252252 if len (t .getSecKeyCache ()) > 0 {
253- preimages := make (map [common.Hash ][]byte , len (t .secKeyCache ))
254- for hk , key := range t .secKeyCache {
255- preimages [common .BytesToHash ([]byte (hk ))] = key
256- }
257253 if t .preimages != nil {
254+ preimages := make (map [common.Hash ][]byte , len (t .secKeyCache ))
255+ for hk , key := range t .secKeyCache {
256+ preimages [common .BytesToHash ([]byte (hk ))] = key
257+ }
258258 t .preimages .InsertPreimage (preimages )
259259 }
260260 t .secKeyCache = make (map [string ][]byte )
You can’t perform that action at this time.
0 commit comments