removed redundant code
This commit is contained in:
parent
1b8b1b4c17
commit
daccbed9a1
@ -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 {
|
||||
|
@ -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`.
|
||||
|
Loading…
Reference in New Issue
Block a user