core/state: more memory efficient preimage allocation (#16663)

This commit is contained in:
atsushi-ishibashi
2019-02-07 18:44:45 +09:00
committed by Martin Holst Swende
parent c57166caa3
commit 81801ccc2b
2 changed files with 10 additions and 1 deletions

View File

@ -502,7 +502,7 @@ func (self *StateDB) Copy() *StateDB {
refund: self.refund,
logs: make(map[common.Hash][]*types.Log, len(self.logs)),
logSize: self.logSize,
preimages: make(map[common.Hash][]byte),
preimages: make(map[common.Hash][]byte, len(self.preimages)),
journal: newJournal(),
}
// Copy the dirty states, logs, and preimages