mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(cli): drop history stages (#2369)
This commit is contained in:
@ -11,4 +11,5 @@ pub enum StageEnum {
|
||||
Hashing,
|
||||
Merkle,
|
||||
TxLookup,
|
||||
History,
|
||||
}
|
||||
|
||||
@ -14,7 +14,8 @@ use reth_db::{
|
||||
use reth_primitives::ChainSpec;
|
||||
use reth_staged_sync::utils::{chainspec::genesis_value_parser, init::insert_genesis_state};
|
||||
use reth_stages::stages::{
|
||||
ACCOUNT_HASHING, EXECUTION, MERKLE_EXECUTION, MERKLE_UNWIND, STORAGE_HASHING,
|
||||
ACCOUNT_HASHING, EXECUTION, INDEX_ACCOUNT_HISTORY, INDEX_STORAGE_HISTORY, MERKLE_EXECUTION,
|
||||
MERKLE_UNWIND, STORAGE_HASHING,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use tracing::info;
|
||||
@ -102,6 +103,15 @@ impl Command {
|
||||
Ok::<_, eyre::Error>(())
|
||||
})??;
|
||||
}
|
||||
StageEnum::History => {
|
||||
tool.db.update(|tx| {
|
||||
tx.clear::<tables::AccountHistory>()?;
|
||||
tx.clear::<tables::StorageHistory>()?;
|
||||
tx.put::<tables::SyncStage>(INDEX_ACCOUNT_HISTORY.0.to_string(), 0)?;
|
||||
tx.put::<tables::SyncStage>(INDEX_STORAGE_HISTORY.0.to_string(), 0)?;
|
||||
Ok::<_, eyre::Error>(())
|
||||
})??;
|
||||
}
|
||||
_ => {
|
||||
info!("Nothing to do for stage {:?}", self.stage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user