mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(stages): unwind on detached local head (#3066)
This commit is contained in:
@ -89,6 +89,16 @@ pub const EMPTY_TRANSACTIONS: H256 = EMPTY_SET_HASH;
|
||||
/// Withdrawals root of empty withdrawals set.
|
||||
pub const EMPTY_WITHDRAWALS: H256 = EMPTY_SET_HASH;
|
||||
|
||||
/// The number of blocks to unwind during a reorg that already became a part of canonical chain.
|
||||
///
|
||||
/// In reality, the node can end up in this particular situation very rarely. It would happen only
|
||||
/// if the node process is abruptly terminated during ongoing reorg and doesn't boot back up for
|
||||
/// long period of time.
|
||||
///
|
||||
/// Unwind depth of `3` blocks significantly reduces the chance that the reorged block is kept in
|
||||
/// the database.
|
||||
pub const BEACON_CONSENSUS_REORG_UNWIND_DEPTH: u64 = 3;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user