From daccbed9a199b77b6d3de97d21a5d2c29a63bb55 Mon Sep 17 00:00:00 2001 From: debris Date: Thu, 14 Jan 2016 23:52:26 +0100 Subject: [PATCH] removed redundant code --- src/account.rs | 4 ---- src/state.rs | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/account.rs b/src/account.rs index 0483a1052..597d49053 100644 --- a/src/account.rs +++ b/src/account.rs @@ -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 { diff --git a/src/state.rs b/src/state.rs index 063df6ca6..fdf71a496 100644 --- a/src/state.rs +++ b/src/state.rs @@ -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`.