mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
reorder types, add docs
This commit is contained in:
@@ -117,7 +117,7 @@ pub enum PruneSegmentError {
|
||||
#[error("the configuration provided for {0} is invalid")]
|
||||
Configuration(PruneSegment),
|
||||
/// Unsupported receipts log filter prune mode for address.
|
||||
#[error("distance prune mode is not supported for receipts log filter, check address {0}")]
|
||||
#[error("receipts log filter for address {0} does not support distance prune mode")]
|
||||
UnsupportedReceiptsLogFilterDistance(Address),
|
||||
}
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ pub enum EitherWriter<'a, CURSOR, N> {
|
||||
StaticFile(StaticFileProviderRWRefMut<'a, N>),
|
||||
}
|
||||
|
||||
#[derive(Debug, EnumIs)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum EitherWriterDestination {
|
||||
Database,
|
||||
StaticFile,
|
||||
}
|
||||
|
||||
impl EitherWriter<'_, (), ()> {
|
||||
/// Returns the destination for writing receipts.
|
||||
///
|
||||
/// The rules are as follows:
|
||||
/// - If the node should not always write receipts to static files, and any receipt pruning is
|
||||
/// enabled, write to the database.
|
||||
/// - If the node should always write receipts to static files, but receipt log filter pruning
|
||||
/// is enabled, write to the database.
|
||||
/// - Otherwise, write to static files.
|
||||
pub fn receipts_destination<P: DBProvider + StorageSettingsCache>(
|
||||
provider: &P,
|
||||
) -> EitherWriterDestination {
|
||||
@@ -44,6 +44,13 @@ impl EitherWriter<'_, (), ()> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, EnumIs)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum EitherWriterDestination {
|
||||
Database,
|
||||
StaticFile,
|
||||
}
|
||||
|
||||
impl<'a, CURSOR, N: NodePrimitives> EitherWriter<'a, CURSOR, N> {
|
||||
/// Increment the block number.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user