some printlns to info

This commit is contained in:
Gav
2018-02-08 14:04:20 +01:00
parent e1ddf32b65
commit ac5a750f45
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -165,9 +165,9 @@ impl_function_executor!(this: FunctionExecutor<'e, E>,
let key = this.memory.get(key_data, key_len as usize).map_err(|_| DummyUserError)?;
let value = this.memory.get(value_data, value_len as usize).map_err(|_| DummyUserError)?;
if let Some(preimage) = this.hash_lookup.get(&key) {
println!("*** Setting storage: %{} -> {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", "*** Setting storage: %{} -> {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
} else {
println!("*** Setting storage: {} -> {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", "*** Setting storage: {} -> {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
}
this.ext.set_storage(key, value);
},
@@ -176,9 +176,9 @@ impl_function_executor!(this: FunctionExecutor<'e, E>,
let value = this.ext.storage(&key).map_err(|_| DummyUserError)?;
if let Some(preimage) = this.hash_lookup.get(&key) {
println!(" Getting storage: %{} == {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", " Getting storage: %{} == {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
} else {
println!(" Getting storage: {} == {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", " Getting storage: {} == {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
}
let offset = this.heap.allocate(value.len() as u32) as u32;
@@ -191,9 +191,9 @@ impl_function_executor!(this: FunctionExecutor<'e, E>,
let key = this.memory.get(key_data, key_len as usize).map_err(|_| DummyUserError)?;
let value = this.ext.storage(&key).map_err(|_| DummyUserError)?;
if let Some(preimage) = this.hash_lookup.get(&key) {
println!(" Getting storage: %{} == {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", " Getting storage: %{} == {} [k={}]", ascii_format(&preimage), HexDisplay::from(&value), HexDisplay::from(&key));
} else {
println!(" Getting storage: {} == {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
info!(target: "wasm-trace", " Getting storage: {} == {} [k={}]", ascii_format(&key), HexDisplay::from(&value), HexDisplay::from(&key));
}
let value = &value[value_offset as usize..];
let written = ::std::cmp::min(value_len as usize, value.len());
+5 -5
View File
@@ -7,11 +7,11 @@ authors = ["Parity Technologies <admin@parity.io>"]
crate-type = ["cdylib"]
[dependencies]
substrate-codec = { path = "../../codec", version = "0.1", default-features = false }
substrate-runtime-std = { path = "../../runtime-std", version = "0.1", default-features = false }
substrate-runtime-io = { path = "../../runtime-io", version = "0.1", default-features = false }
substrate-primitives = { path = "../../primitives", version = "0.1", default-features = false }
polkadot-primitives = { path = "../../polkadot-primitives", version = "0.1", default-features = false }
substrate-codec = { path = "../../codec", default-features = false }
substrate-runtime-std = { path = "../../runtime-std", default-features = false }
substrate-runtime-io = { path = "../../runtime-io", default-features = false }
substrate-primitives = { path = "../../primitives", default-features = false }
polkadot-primitives = { path = "../../polkadot-primitives", default-features = false }
[features]
default = []