diff --git a/src/tests/executive.rs b/src/tests/executive.rs index 08656da22..8149364ab 100644 --- a/src/tests/executive.rs +++ b/src/tests/executive.rs @@ -33,7 +33,7 @@ impl Engine for TestEngine { struct CallCreate { data: Bytes, - destination: Address, + destination: Option
, _gas_limit: U256, value: U256 } @@ -81,7 +81,7 @@ impl<'a> Ext for TestExt<'a> { (gas_left, Some(address)) => { self.callcreates.push(CallCreate { data: code.to_vec(), - destination: address.clone(), + destination: Some(address.clone()), _gas_limit: *gas, value: *value }); @@ -89,14 +89,14 @@ impl<'a> Ext for TestExt<'a> { }, // creation failed only due to reaching max_depth (gas_left, None) if ext.state.balance(&ext.params.address) >= *value => { - let address = contract_address(&ext.params.address, &ext.state.nonce(&ext.params.address)); self.callcreates.push(CallCreate { data: code.to_vec(), - // TODO: address is not stored here? - destination: Address::new(), + // callcreate test does not need an address + destination: None, _gas_limit: *gas, value: *value }); + let address = contract_address(&ext.params.address, &ext.state.nonce(&ext.params.address)); (gas_left, Some(address)) }, other => other @@ -117,7 +117,7 @@ impl<'a> Ext for TestExt<'a> { if ext.state.balance(&ext.params.address) >= *value { self.callcreates.push(CallCreate { data: data.to_vec(), - destination: receive_address.clone(), + destination: Some(receive_address.clone()), _gas_limit: *call_gas, value: *value }); @@ -244,7 +244,10 @@ fn do_json_test(json_data: &[u8]) -> Vec