@@ -128,7 +128,7 @@ impl<'a, T, V> Ext for TestExt<'a, T, V> where T: Tracer, V: VMTracer {
|
||||
MessageCallResult::Success(*gas)
|
||||
}
|
||||
|
||||
fn extcode(&self, address: &Address) -> Bytes {
|
||||
fn extcode(&self, address: &Address) -> Arc<Bytes> {
|
||||
self.ext.extcode(address)
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ fn do_json_test_for(vm_type: &VMType, json_data: &[u8]) -> Vec<String> {
|
||||
for (address, account) in vm.post_state.unwrap().into_iter() {
|
||||
let address = address.into();
|
||||
let code: Vec<u8> = account.code.into();
|
||||
fail_unless(state.code(&address).unwrap_or_else(Vec::new) == code, "code is incorrect");
|
||||
fail_unless(state.code(&address).as_ref().map_or_else(|| code.is_empty(), |c| &**c == &code), "code is incorrect");
|
||||
fail_unless(state.balance(&address) == account.balance.into(), "balance is incorrect");
|
||||
fail_unless(state.nonce(&address) == account.nonce.into(), "nonce is incorrect");
|
||||
account.storage.into_iter().foreach(|(k, v)| {
|
||||
|
||||
Reference in New Issue
Block a user