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
ccbab1be
Commit
ccbab1be
authored
2 years ago
by
Sergej Sakac
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed pruning docs (#11519)
parent
678fd0f5
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/client/cli/src/params/pruning_params.rs
+3
-3
3 additions, 3 deletions
substrate/client/cli/src/params/pruning_params.rs
substrate/client/state-db/src/lib.rs
+2
-1
2 additions, 1 deletion
substrate/client/state-db/src/lib.rs
with
5 additions
and
4 deletions
substrate/client/cli/src/params/pruning_params.rs
+
3
−
3
View file @
ccbab1be
...
...
@@ -25,9 +25,9 @@ use sc_service::{KeepBlocks, PruningMode};
pub
struct
PruningParams
{
/// Specify the state pruning mode, a number of blocks to keep or 'archive'.
///
/// Default is to keep
all block states if the node is running as a
///
validator (i.e. 'archive')
,
o
the
rwise
state
is only
kept for
the last
///
256 blocks
.
/// Default is to keep
only the last 256 blocks,
///
otherwise
, the state
can be
kept for
all of the blocks (i.e 'archive'),
///
or for all of the canonical blocks (i.e 'archive-canonical')
.
#[clap(long,
value_name
=
"PRUNING_MODE"
)]
pub
pruning
:
Option
<
String
>
,
/// Specify the number of finalized blocks to keep in the database.
...
...
This diff is collapsed.
Click to expand it.
substrate/client/state-db/src/lib.rs
+
2
−
1
View file @
ccbab1be
...
...
@@ -239,7 +239,7 @@ impl PruningMode {
}
}
///
Is this an archive (either ArchiveAll or ArchiveCanonical)
pruning mode
?
///
Returns the
pruning mode
pub
fn
id
(
&
self
)
->
&
[
u8
]
{
match
self
{
PruningMode
::
ArchiveAll
=>
PRUNING_MODE_ARCHIVE
,
...
...
@@ -247,6 +247,7 @@ impl PruningMode {
PruningMode
::
Constrained
(
_
)
=>
PRUNING_MODE_CONSTRAINED
,
}
}
pub
fn
from_id
(
id
:
&
[
u8
])
->
Option
<
Self
>
{
match
id
{
PRUNING_MODE_ARCHIVE
=>
Some
(
Self
::
ArchiveAll
),
...
...
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