mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(bin): temporarily disable full node (#4112)
This commit is contained in:
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user