feat(config, primitives): validate Receipts prune part (#3587)

This commit is contained in:
Alexey Shekhirin
2023-07-10 12:07:13 +01:00
committed by GitHub
parent 31af4d55bc
commit 91dd782243
3 changed files with 56 additions and 2 deletions

View File

@ -5,7 +5,7 @@ use reth_downloaders::{
headers::reverse_headers::ReverseHeadersDownloaderBuilder,
};
use reth_network::{NetworkConfigBuilder, PeersConfig, SessionsConfig};
use reth_primitives::PruneMode;
use reth_primitives::{serde_helper::deserialize_opt_prune_mode_with_min_distance, PruneMode};
use secp256k1::SecretKey;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
@ -305,7 +305,10 @@ pub struct PruneParts {
#[serde(skip_serializing_if = "Option::is_none")]
pub transaction_lookup: Option<PruneMode>,
/// Receipts pruning configuration.
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(
skip_serializing_if = "Option::is_none",
deserialize_with = "deserialize_opt_prune_mode_with_min_distance::<64, _>"
)]
pub receipts: Option<PruneMode>,
/// Account History pruning configuration.
#[serde(skip_serializing_if = "Option::is_none")]