mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
fix(provider): skip sender pruning during reorg when sender_recovery is full (#22271)
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
0ba685386d
commit
9ecef47aff
5
.changelog/rich-lakes-bark.md
Normal file
5
.changelog/rich-lakes-bark.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
reth-provider: patch
|
||||
---
|
||||
|
||||
Fixed sender pruning during block reorg to skip when sender_recovery is fully pruned, preventing a fatal crash when no sender data exists in static files.
|
||||
@@ -3576,7 +3576,12 @@ impl<TX: DbTxMut + DbTx + 'static, N: NodeTypesForProvider> BlockWriter
|
||||
})?;
|
||||
}
|
||||
|
||||
EitherWriter::new_senders(self, last_block_number)?.prune_senders(unwind_tx_from, block)?;
|
||||
// Skip sender pruning when sender_recovery is fully pruned, since no sender data
|
||||
// exists in static files or the database.
|
||||
if self.prune_modes.sender_recovery.is_none_or(|m| !m.is_full()) {
|
||||
EitherWriter::new_senders(self, last_block_number)?
|
||||
.prune_senders(unwind_tx_from, block)?;
|
||||
}
|
||||
|
||||
self.remove_bodies_above(block)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user