jit passes all tests expect these, where gas exceed 2 ^ 63
This commit is contained in:
parent
3030b18683
commit
87d4c0a775
@ -195,10 +195,6 @@ impl<'a> evmjit::Ext for ExtAdapter<'a> {
|
|||||||
|
|
||||||
// receive address and code address are the same in normal calls
|
// receive address and code address are the same in normal calls
|
||||||
let is_callcode = receive_address != code_address;
|
let is_callcode = receive_address != code_address;
|
||||||
if !is_callcode {
|
|
||||||
// it's a delegatecall... fix it better.
|
|
||||||
value = None;
|
|
||||||
}
|
|
||||||
|
|
||||||
if !is_callcode && !self.ext.exists(&code_address) {
|
if !is_callcode && !self.ext.exists(&code_address) {
|
||||||
gas_cost = gas_cost + U256::from(self.ext.schedule().call_new_account_gas);
|
gas_cost = gas_cost + U256::from(self.ext.schedule().call_new_account_gas);
|
||||||
@ -314,16 +310,11 @@ impl evm::Evm for JitEvm {
|
|||||||
data.address = params.address.into_jit();
|
data.address = params.address.into_jit();
|
||||||
data.caller = params.sender.into_jit();
|
data.caller = params.sender.into_jit();
|
||||||
data.origin = params.origin.into_jit();
|
data.origin = params.origin.into_jit();
|
||||||
match params.value {
|
data.transfer_value = match params.value {
|
||||||
ActionValue::Transfer(val) => {
|
ActionValue::Transfer(val) => val.into_jit(),
|
||||||
data.transfer_value = val.into_jit();
|
ActionValue::Apparent(val) => val.into_jit()
|
||||||
data.apparent_value = U256::zero().into_jit();
|
|
||||||
},
|
|
||||||
ActionValue::Apparent(val) => {
|
|
||||||
data.transfer_value = U256::zero().into_jit();
|
|
||||||
data.apparent_value = val.into_jit();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
data.apparent_value = data.transfer_value;
|
||||||
|
|
||||||
let mut schedule = evmjit::ScheduleHandle::new();
|
let mut schedule = evmjit::ScheduleHandle::new();
|
||||||
schedule.have_delegate_call = ext.schedule().have_delegate_call;
|
schedule.have_delegate_call = ext.schedule().have_delegate_call;
|
||||||
|
@ -254,7 +254,7 @@ fn test_origin(factory: super::Factory) {
|
|||||||
assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681");
|
assert_store(&ext, 0, "000000000000000000000000cd1722f2947def4cf144679da39c4c32bdc35681");
|
||||||
}
|
}
|
||||||
|
|
||||||
evm_test!{ignorejit => test_sender: test_sender_jit, test_sender_int}
|
evm_test!{test_sender: test_sender_jit, test_sender_int}
|
||||||
fn test_sender(factory: super::Factory) {
|
fn test_sender(factory: super::Factory) {
|
||||||
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||||
let sender = Address::from_str("cd1722f2947def4cf144679da39c4c32bdc35681").unwrap();
|
let sender = Address::from_str("cd1722f2947def4cf144679da39c4c32bdc35681").unwrap();
|
||||||
@ -366,7 +366,7 @@ fn test_log_sender(factory: super::Factory) {
|
|||||||
assert_eq!(ext.logs[0].data, "ff00000000000000000000000000000000000000000000000000000000000000".from_hex().unwrap());
|
assert_eq!(ext.logs[0].data, "ff00000000000000000000000000000000000000000000000000000000000000".from_hex().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
evm_test!{ignorejit => test_blockhash: test_blockhash_jit, test_blockhash_int}
|
evm_test!{test_blockhash: test_blockhash_jit, test_blockhash_int}
|
||||||
fn test_blockhash(factory: super::Factory) {
|
fn test_blockhash(factory: super::Factory) {
|
||||||
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||||
let code = "600040600055".from_hex().unwrap();
|
let code = "600040600055".from_hex().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user