We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7cf183 commit 8414b07Copy full SHA for 8414b07
bus-mapping/src/circuit_input_builder/l2.rs
@@ -32,15 +32,18 @@ impl From<&ZktrieState> for StateDB {
32
let mut sdb = StateDB::new();
33
34
for (addr, acc) in mpt_state.state() {
35
- sdb.set_account(addr, acc.into())
+ if !acc.keccak_code_hash.is_zero() {
36
+ sdb.set_account(addr, acc.into())
37
+ }
38
}
39
40
for (storage_key, data) in mpt_state.storage() {
- //TODO: add an warning on non-existed account?
- let (_, acc) = sdb.get_account_mut(&storage_key.0);
41
- acc.storage.insert(storage_key.1, *data.as_ref());
+ if !data.as_ref().is_zero() {
42
+ //TODO: add an warning on non-existed account?
43
+ let (_, acc) = sdb.get_account_mut(&storage_key.0);
44
+ acc.storage.insert(storage_key.1, *data.as_ref());
45
46
-
47
sdb
48
49
0 commit comments