Storage should kill zero entries.
This commit is contained in:
parent
478cebf42f
commit
6f5d383834
@ -187,7 +187,10 @@ impl Account {
|
|||||||
if f == &Filth::Dirty {
|
if f == &Filth::Dirty {
|
||||||
// cast key and value to trait type,
|
// cast key and value to trait type,
|
||||||
// so we can call overloaded `to_bytes` method
|
// so we can call overloaded `to_bytes` method
|
||||||
t.insert(k, &encode(&U256::from(v.as_slice())));
|
match v.is_zero() {
|
||||||
|
true => t.remove(k),
|
||||||
|
false => t.insert(k, &encode(&U256::from(v.as_slice()))),
|
||||||
|
}
|
||||||
*f = Filth::Clean;
|
*f = Filth::Clean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user