feat(bin): temporarily disable full node (#4112)

This commit is contained in:
Alexey Shekhirin
2023-08-08 12:30:50 +01:00
committed by GitHub
parent 3d1857636d
commit 7fb9b8414f
2 changed files with 7 additions and 5 deletions

View File

@ -18,14 +18,16 @@ pub struct PruningArgs {
impl PruningArgs {
/// Returns pruning configuration.
pub fn prune_config(&self, chain_spec: Arc<ChainSpec>) -> Option<PruneConfig> {
if self.full {
pub fn prune_config(&self, _chain_spec: Arc<ChainSpec>) -> eyre::Result<Option<PruneConfig>> {
Ok(if self.full {
eyre::bail!("full node is not supported yet, keep an eye on next releases");
#[allow(unreachable_code)]
Some(PruneConfig {
block_interval: 5,
parts: PruneModes {
sender_recovery: Some(PruneMode::Distance(128)),
transaction_lookup: None,
receipts: chain_spec
receipts: _chain_spec
.deposit_contract
.as_ref()
.map(|contract| PruneMode::Before(contract.block)),
@ -35,6 +37,6 @@ impl PruningArgs {
})
} else {
None
}
})
}
}

View File

@ -337,7 +337,7 @@ impl<Ext: RethCliExt> NodeCommand<Ext> {
None
};
let prune_config = self.pruning.prune_config(Arc::clone(&self.chain)).or(config.prune);
let prune_config = self.pruning.prune_config(Arc::clone(&self.chain))?.or(config.prune);
// Configure the pipeline
let (mut pipeline, client) = if self.dev.dev {