Skip to content

Commit

Permalink
no set the root index when switch
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Dec 18, 2024
1 parent ba6d19f commit f068ef6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl BlockChain {
uncles: Option<HashMap<HashValue, MintedUncleNumber>>,
storage: Arc<dyn Store>,
vm_metrics: Option<VMMetrics>,
mut dag: BlockDAG,
dag: BlockDAG,
) -> Result<Self> {
let block_info = storage
.get_block_info(head_block.id())?
Expand Down Expand Up @@ -132,10 +132,6 @@ impl BlockChain {
vm_metrics,
dag: dag.clone(),
};
let genesis_header = storage
.get_block_header_by_hash(genesis)?
.ok_or_else(|| format_err!("failed to get genesis because it is none"))?;
dag.set_reindex_root(genesis_header.parent_hash())?;
watch(CHAIN_WATCH_NAME, "n1251");
match uncles {
Some(data) => chain.uncles = data,
Expand Down

0 comments on commit f068ef6

Please sign in to comment.