Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
55a858fa
Commit
55a858fa
authored
Nov 19, 2019
by
Andrew Jones
Browse files
Revert "TEMPORARY: diagnostic logging"
This reverts commit
14bfc6e2
parent
14bfc6e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/src/env2/env_access/mutable.rs
View file @
55a858fa
...
...
@@ -333,7 +333,6 @@ where
where
R
:
scale
::
Decode
,
{
self
.println
(
"mutable::get_runtime_storage"
);
T
::
get_runtime_storage
(
&
mut
self
.buffer
,
key
)
}
}
core/src/env2/srml/impls.rs
View file @
55a858fa
...
...
@@ -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
);
...
...
examples/lang2/runtime-storage/src/lib.rs
View file @
55a858fa
...
...
@@ -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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment