Commit 55a858fa authored by Andrew Jones's avatar Andrew Jones

Revert "TEMPORARY: diagnostic logging"

This reverts commit 14bfc6e2
parent 14bfc6e2
......@@ -333,7 +333,6 @@ where
where
R: scale::Decode,
{
self.println("mutable::get_runtime_storage");
T::get_runtime_storage(&mut self.buffer, key)
}
}
......@@ -419,13 +419,10 @@ where
I: AsMut<[u8]> + EnlargeTo,
R: scale::Decode,
{
Self::println("get_runtime_storage");
let ret = ext::get_runtime_storage(key);
if !ret.is_success() {
Self::println("get_runtime_storage: is_success == false");
return Err(Error::InvalidStorageKey)
}
Self::println("get_runtime_storage: is_success == true");
let req_len = ext::scratch_size();
buffer.enlarge_to(req_len);
let ret = ext::scratch_read(&mut buffer.as_mut()[0..req_len], 0);
......
......@@ -35,10 +35,8 @@ mod runtime {
/// Returns the account balance, read directly from runtime storage
#[ink(message)]
fn get_balance(&self, account: AccountId) -> Balance {
self.env().println("get_balance");
const BALANCE_OF: &[u8] = b"balance:";
let key = account.to_keyed_vec(BALANCE_OF);
self.env().println("constructed key");
match self.env().get_runtime_storage::<Balance>(&key) {
Ok(balance) => {
self.env().println("get_runtime_storage: Read balance Ok");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment