Minor renaming diff -> state_diff
This commit is contained in:
@@ -255,7 +255,7 @@ impl<C, M> Ethcore for EthcoreClient<C, M> where C: BlockChainClient + 'static,
|
||||
from_params(params)
|
||||
.and_then(|(request,)| {
|
||||
let signed = try!(self.sign_call(request));
|
||||
let r = take_weak!(self.client).call(&signed, CallAnalytics{ vm_tracing: true, diffing: false });
|
||||
let r = take_weak!(self.client).call(&signed, CallAnalytics{ vm_tracing: true, state_diffing: false });
|
||||
if let Ok(executed) = r {
|
||||
if let Some(vm_trace) = executed.vm_trace {
|
||||
return Ok(vm_trace_to_object(&vm_trace));
|
||||
@@ -265,14 +265,14 @@ impl<C, M> Ethcore for EthcoreClient<C, M> where C: BlockChainClient + 'static,
|
||||
})
|
||||
}
|
||||
|
||||
fn diff_call(&self, params: Params) -> Result<Value, Error> {
|
||||
trace!(target: "jsonrpc", "diff_call: {:?}", params);
|
||||
fn state_diff_call(&self, params: Params) -> Result<Value, Error> {
|
||||
trace!(target: "jsonrpc", "state_diff_call: {:?}", params);
|
||||
from_params(params)
|
||||
.and_then(|(request,)| {
|
||||
let signed = try!(self.sign_call(request));
|
||||
let r = take_weak!(self.client).call(&signed, CallAnalytics{ vm_tracing: false, diffing: true });
|
||||
let r = take_weak!(self.client).call(&signed, CallAnalytics{ vm_tracing: false, state_diffing: true });
|
||||
if let Ok(executed) = r {
|
||||
if let Some(state_diff) = executed.diff {
|
||||
if let Some(state_diff) = executed.state_diff {
|
||||
return Ok(state_diff_to_object(&state_diff));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ fn rpc_eth_call() {
|
||||
output: vec![0x12, 0x34, 0xff],
|
||||
trace: None,
|
||||
vm_trace: None,
|
||||
diff: None,
|
||||
state_diff: None,
|
||||
});
|
||||
|
||||
let request = r#"{
|
||||
@@ -466,7 +466,7 @@ fn rpc_eth_call_default_block() {
|
||||
output: vec![0x12, 0x34, 0xff],
|
||||
trace: None,
|
||||
vm_trace: None,
|
||||
diff: None,
|
||||
state_diff: None,
|
||||
});
|
||||
|
||||
let request = r#"{
|
||||
@@ -500,7 +500,7 @@ fn rpc_eth_estimate_gas() {
|
||||
output: vec![0x12, 0x34, 0xff],
|
||||
trace: None,
|
||||
vm_trace: None,
|
||||
diff: None,
|
||||
state_diff: None,
|
||||
});
|
||||
|
||||
let request = r#"{
|
||||
@@ -535,7 +535,7 @@ fn rpc_eth_estimate_gas_default_block() {
|
||||
output: vec![0x12, 0x34, 0xff],
|
||||
trace: None,
|
||||
vm_trace: None,
|
||||
diff: None,
|
||||
state_diff: None,
|
||||
});
|
||||
|
||||
let request = r#"{
|
||||
|
||||
@@ -76,7 +76,7 @@ pub trait Ethcore: Sized + Send + Sync + 'static {
|
||||
fn vm_trace_call(&self, _: Params) -> Result<Value, Error>;
|
||||
|
||||
/// Executes the given call and returns the diff for it.
|
||||
fn diff_call(&self, params: Params) -> Result<Value, Error>;
|
||||
fn state_diff_call(&self, params: Params) -> Result<Value, Error>;
|
||||
|
||||
/// Should be used to convert object to io delegate.
|
||||
fn to_delegate(self) -> IoDelegate<Self> {
|
||||
@@ -101,7 +101,7 @@ pub trait Ethcore: Sized + Send + Sync + 'static {
|
||||
delegate.add_method("ethcore_defaultExtraData", Ethcore::default_extra_data);
|
||||
|
||||
delegate.add_method("ethcore_vmTraceCall", Ethcore::vm_trace_call);
|
||||
delegate.add_method("ethcore_diffCall", Ethcore::diff_call);
|
||||
delegate.add_method("ethcore_stateDiffCall", Ethcore::state_diff_call);
|
||||
|
||||
delegate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user