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
2618fb4a
Commit
2618fb4a
authored
Nov 19, 2019
by
Andrew Jones
Browse files
Add some logging contract
parent
e08d300c
Pipeline
#69429
failed with stages
in 14 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
examples/lang2/runtime-storage/src/lib.rs
View file @
2618fb4a
...
...
@@ -38,9 +38,12 @@ mod runtime {
const
BALANCE_OF
:
&
[
u8
]
=
b"balance:"
;
let
key
=
account
.to_keyed_vec
(
BALANCE_OF
);
match
self
.env
()
.get_runtime_storage
::
<
Balance
>
(
&
key
)
{
Ok
(
balance
)
=>
balance
,
Ok
(
balance
)
=>
{
self
.env
()
.println
(
"get_runtime_storage: Read balance Ok"
);
balance
},
Err
(
_
)
=>
{
self
.env
()
.println
(
"Error reading balance"
);
self
.env
()
.println
(
"
get_runtime_storage:
Error reading balance"
);
0
},
}
...
...
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