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
5a954c98
Verified
Commit
5a954c98
authored
1 year ago
by
Michal Kucharczyk
Browse files
Options
Downloads
Patches
Plain Diff
doc
parent
1932cf19
Branches
Branches containing commit
No related merge requests found
Pipeline
#457015
canceled with stages
in 18 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/primitives/genesis-builder/src/lib.rs
+8
-4
8 additions, 4 deletions
substrate/primitives/genesis-builder/src/lib.rs
with
8 additions
and
4 deletions
substrate/primitives/genesis-builder/src/lib.rs
+
8
−
4
View file @
5a954c98
...
...
@@ -24,7 +24,9 @@
//!
//! Additionally the runtime may provide a number of partial predefined `RuntimeGenesisConfig`
//! configurations in the form of patches which shall be applied on top of the default
//! `RuntimeGenesisConfig`. These predefined configurations are refered to as presets.
//! `RuntimeGenesisConfig`. The patch is a JSON blob, which essentially comprises the list of
//! key-value pairs that are to be customized in the default runtime genesis config.
//! These predefined configurations are refered to as presets.
//!
//! This allows the runtime to provide a number of predefined configs (e.g. for different
//! testnets) without neccessity to leak the runtime types outside the itself.
...
...
@@ -88,9 +90,11 @@ sp_api::decl_runtime_apis! {
/// `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
/// `RuntimeGenesisConfig`.
///
/// Otherwise function returns a JSON representation of the built-in, named
/// `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
/// exists. Returned `Vec<u8>` contains bytes of JSON blob.
/// Otherwise function returns a JSON representation of the built-in, named `RuntimeGenesisConfig` preset
/// identified by `id`, or `None` if such preset does not exists. Returned `Vec<u8>` contains bytes of JSON blob
/// (patch) which comprises a list of (potentially nested) key-value pairs that are intended for custimizing the
/// default runtime genesis config. The patch shall be merged (rfc7386) with default genesis config in order to
/// obtain a full representation of genesis config that can be used in `build_state` method.
fn
get_preset
(
id
:
&
Option
<
PresetId
>
)
->
Option
<
Vec
<
u8
>>
;
/// Returns a list of names for available builtin `RuntimeGenesisConfig` presets.
...
...
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