(&mut self, key: &Account, data: &AccountData)
| 26 | } |
| 27 | |
| 28 | pub(crate) fn upsert(&mut self, key: &Account, data: &AccountData) -> Result<()> { |
| 29 | self.trie |
| 30 | .insert(key.as_ref(), &serialize(&data)?) |
| 31 | .map_err(|_| ChainError::StoragePutError(Storage::key_string(key))) |
| 32 | } |
| 33 | |
| 34 | /// Add an account with default account data. |
| 35 | /// Skip if the account already exists. |
no test coverage detected