removed redundant code

This commit is contained in:
debris 2016-01-14 23:52:26 +01:00
parent 1b8b1b4c17
commit daccbed9a1
2 changed files with 1 additions and 8 deletions

View File

@ -99,10 +99,6 @@ impl Account {
pub fn set_storage(&mut self, key: H256, value: H256) {
self.storage_overlay.borrow_mut().insert(key, (Filth::Dirty, value));
}
pub fn reset_storage(&mut self, key: &H256) {
self.storage_overlay.borrow_mut().remove(key);
}
/// Get (and cache) the contents of the trie's storage at `key`.
pub fn storage_at(&self, db: &HashDB, key: &H256) -> H256 {

View File

@ -127,10 +127,7 @@ impl State {
/// Mutate storage of account `a` so that it is `value` for `key`.
pub fn set_storage(&mut self, a: &Address, key: H256, value: H256) {
match value == H256::new() {
true => self.require(a, false).reset_storage(&key),
false => self.require(a, false).set_storage(key, value)
}
self.require(a, false).set_storage(key, value)
}
/// Initialise the code of account `a` so that it is `value` for `key`.