CommitTrie the storage trie of the object to db. This updates the trie root.
(db Database)
| 222 | // CommitTrie the storage trie of the object to db. |
| 223 | // This updates the trie root. |
| 224 | func (self *stateObject) CommitTrie(db Database) error { |
| 225 | self.updateTrie(db) |
| 226 | if self.dbErr != nil { |
| 227 | return self.dbErr |
| 228 | } |
| 229 | root, err := self.trie.Commit(nil) |
| 230 | if err == nil { |
| 231 | self.data.Root = root |
| 232 | } |
| 233 | return err |
| 234 | } |
| 235 | |
| 236 | // AddBalance removes amount from c's balance. |
| 237 | // It is used to add funds to the destination account of a transfer. |
no test coverage detected