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
8f8b0887
Commit
8f8b0887
authored
3 years ago
by
Bastian Köcher
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
node-template: Do not provide benchmarking host functions by default (#10005)
parent
582ac8f9
Branches
gh-readonly-queue/master/pr-7227-7710483541ce273df892c77a6e300aaa2efa1dca
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/bin/node-template/node/src/service.rs
+5
-0
5 additions, 0 deletions
substrate/bin/node-template/node/src/service.rs
with
5 additions
and
0 deletions
substrate/bin/node-template/node/src/service.rs
+
5
−
0
View file @
8f8b0887
...
...
@@ -16,7 +16,12 @@ use std::{sync::Arc, time::Duration};
pub
struct
ExecutorDispatch
;
impl
sc_executor
::
NativeExecutionDispatch
for
ExecutorDispatch
{
/// Only enable the benchmarking host functions when we actually want to benchmark.
#[cfg(feature
=
"runtime-benchmarks"
)]
type
ExtendHostFunctions
=
frame_benchmarking
::
benchmarking
::
HostFunctions
;
/// Otherwise we only use the default Substrate host functions.
#[cfg(not(feature
=
"runtime-benchmarks"
))]
type
ExtendHostFunctions
=
();
fn
dispatch
(
method
:
&
str
,
data
:
&
[
u8
])
->
Option
<
Vec
<
u8
>>
{
node_template_runtime
::
api
::
dispatch
(
method
,
data
)
...
...
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