mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
better error
This commit is contained in:
@@ -67,9 +67,7 @@ impl ReceiptsLogPruneConfig {
|
||||
let mut errors = Vec::new();
|
||||
self.retain(|address, mode| {
|
||||
if mode.is_distance() {
|
||||
errors.push(PruneSegmentError::UnsupportedReceiptsLogFilterPruneMode(
|
||||
*address, *mode,
|
||||
));
|
||||
errors.push(PruneSegmentError::UnsupportedReceiptsLogFilterDistance(*address));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ pub enum PruneSegmentError {
|
||||
#[error("the configuration provided for {0} is invalid")]
|
||||
Configuration(PruneSegment),
|
||||
/// Unsupported receipts log filter prune mode for address.
|
||||
#[error("unsupported receipts log filter prune mode for address {0}: {1:?}")]
|
||||
UnsupportedReceiptsLogFilterPruneMode(Address, PruneMode),
|
||||
#[error("distance prune mode is not supported for receipts log filter, check address {0}")]
|
||||
UnsupportedReceiptsLogFilterDistance(Address),
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user