Skip to content

Commit

Permalink
Compliance fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas committed Nov 20, 2023
1 parent 11e36de commit debeb73
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
cargo run --release --verbose -p jsontests -- \
jsontests/res/ethtests/GeneralStateTests/stCodeCopyTest/ \
jsontests/res/ethtests/GeneralStateTests/stExample/ \
jsontests/res/ethtests/GeneralStateTests/stSelfBalance \
jsontests/res/ethtests/GeneralStateTests/stSLoadTest/ \
jsontests/res/ethtests/GeneralStateTests/VMTests/vmArithmeticTest/ \
jsontests/res/ethtests/GeneralStateTests/VMTests/vmBitwiseLogicOperation/ \
Expand Down
8 changes: 7 additions & 1 deletion jsontests/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ pub fn run_test(_filename: &str, _test_name: &str, test: Test, debug: bool) -> R
state,
logs: Vec::new(),
suicides: Vec::new(),
hots: BTreeSet::new(),
hots: {
let mut hots = BTreeSet::new();
for i in 1..10 {
hots.insert((u256_to_h256(U256::from(i)).into(), None));
}
hots
},
}],
};
let mut step_backend = run_backend.clone();
Expand Down
4 changes: 4 additions & 0 deletions src/backend/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ impl RuntimeBackend for InMemoryBackend {
}

fn deposit(&mut self, target: H160, value: U256) {
if value == U256::zero() {
return;
}

self.current_layer_mut()
.state
.entry(target)
Expand Down

0 comments on commit debeb73

Please sign in to comment.