SetState updates a value in account storage.
(db Database, key, value common.Hash)
| 184 | |
| 185 | // SetState updates a value in account storage. |
| 186 | func (self *stateObject) SetState(db Database, key, value common.Hash) { |
| 187 | self.db.journal.append(storageChange{ |
| 188 | account: &self.address, |
| 189 | key: key, |
| 190 | prevalue: self.GetState(db, key), |
| 191 | }) |
| 192 | self.setState(key, value) |
| 193 | } |
| 194 | |
| 195 | func (self *stateObject) setState(key, value common.Hash) { |
| 196 | self.cachedStorage[key] = value |