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{} {
250
250
func (t * StateTrie ) Commit (collectLeaf bool ) (common.Hash , * trienode.NodeSet ) {
251
251
// Write all the pre-images to the actual disk database
252
252
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
- }
257
253
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
+ }
258
258
t .preimages .InsertPreimage (preimages )
259
259
}
260
260
t .secKeyCache = make (map [string ][]byte )
You can’t perform that action at this time.
0 commit comments