Make CALLCODE to trace value to be the code address (#9881)
This commit is contained in:
		
							parent
							
								
									0d593199d0
								
							
						
					
					
						commit
						18a2e6265d
					
				@ -1593,7 +1593,7 @@ mod tests {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	#[test]
 | 
			
		||||
	fn should_not_trace_callcode() {
 | 
			
		||||
	fn should_trace_callcode_properly() {
 | 
			
		||||
		init_log();
 | 
			
		||||
 | 
			
		||||
		let mut state = get_temp_state();
 | 
			
		||||
@ -1635,7 +1635,7 @@ mod tests {
 | 
			
		||||
			subtraces: 0,
 | 
			
		||||
			action: trace::Action::Call(trace::Call {
 | 
			
		||||
				from: 0xa.into(),
 | 
			
		||||
				to: 0xa.into(),
 | 
			
		||||
				to: 0xb.into(),
 | 
			
		||||
				value: 0.into(),
 | 
			
		||||
				gas: 4096.into(),
 | 
			
		||||
				input: vec![],
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,7 @@ pub struct Call {
 | 
			
		||||
impl From<ActionParams> for Call {
 | 
			
		||||
	fn from(p: ActionParams) -> Self {
 | 
			
		||||
		match p.call_type {
 | 
			
		||||
			CallType::DelegateCall => Call {
 | 
			
		||||
			CallType::DelegateCall | CallType::CallCode => Call {
 | 
			
		||||
				from: p.address,
 | 
			
		||||
				to: p.code_address,
 | 
			
		||||
				value: p.value.value(),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user