Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
4242a4e5
Commit
4242a4e5
authored
5 years ago
by
Arkadiy Paronyan
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Propagate cache when calling into runtime (#3319)
parent
394eff6c
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/core/client/src/call_executor.rs
+7
-4
7 additions, 4 deletions
substrate/core/client/src/call_executor.rs
with
7 additions
and
4 deletions
substrate/core/client/src/call_executor.rs
+
7
−
4
View file @
4242a4e5
...
...
@@ -241,7 +241,7 @@ where
let
mut
state
=
self
.backend
.state_at
(
*
at
)
?
;
match
recorder
{
let
result
=
match
recorder
{
Some
(
recorder
)
=>
{
let
trie_state
=
state
.as_trie_backend
()
.ok_or_else
(||
...
...
@@ -286,15 +286,18 @@ where
native_call
,
)
.map
(|(
result
,
_
,
_
)|
result
)
.map_err
(
Into
::
into
)
}
}
?
;
self
.backend
.destroy_state
(
state
)
?
;
Ok
(
result
)
}
fn
runtime_version
(
&
self
,
id
:
&
BlockId
<
Block
>
)
->
error
::
Result
<
RuntimeVersion
>
{
let
mut
overlay
=
OverlayedChanges
::
default
();
let
state
=
self
.backend
.state_at
(
*
id
)
?
;
let
mut
ext
=
Ext
::
new
(
&
mut
overlay
,
&
state
,
self
.backend
.changes_trie_storage
(),
NeverOffchainExt
::
new
());
self
.executor
.runtime_version
(
&
mut
ext
)
.ok_or
(
error
::
Error
::
VersionInvalid
.into
())
let
version
=
self
.executor
.runtime_version
(
&
mut
ext
);
self
.backend
.destroy_state
(
state
)
?
;
version
.ok_or
(
error
::
Error
::
VersionInvalid
.into
())
}
fn
call_at_state
<
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment