Skip to content

Commit

Permalink
remove last reference to ghostdag_primary_*
Browse files Browse the repository at this point in the history
  • Loading branch information
coderofstuff committed Oct 15, 2024
1 parent 2e8deab commit 4168456
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consensus/src/pipeline/header_processor/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ impl HeaderProcessor {
}

fn commit_header(&self, ctx: HeaderProcessingContext, header: &Header) {
let ghostdag_primary_data = ctx.ghostdag_data.as_ref().unwrap();
let ghostdag_data = ctx.ghostdag_data.as_ref().unwrap();
let pp = ctx.pruning_point();

// Create a DB batch writer
Expand All @@ -365,7 +365,7 @@ impl HeaderProcessor {
//
// Append-only stores: these require no lock and hence done first in order to reduce locking time
//
self.ghostdag_store.insert_batch(&mut batch, ctx.hash, ghostdag_primary_data).unwrap();
self.ghostdag_store.insert_batch(&mut batch, ctx.hash, ghostdag_data).unwrap();

if let Some(window) = ctx.block_window_for_difficulty {
self.block_window_cache_for_difficulty.insert(ctx.hash, window);
Expand All @@ -387,8 +387,8 @@ impl HeaderProcessor {
// time, and thus serializing this part will do no harm. However this should be benchmarked. The
// alternative is to create a separate ReachabilityProcessor and to manage things more tightly.
let mut staging = StagingReachabilityStore::new(self.reachability_store.upgradable_read());
let selected_parent = ghostdag_primary_data.selected_parent;
let mut reachability_mergeset = ghostdag_primary_data.unordered_mergeset_without_selected_parent();
let selected_parent = ghostdag_data.selected_parent;
let mut reachability_mergeset = ghostdag_data.unordered_mergeset_without_selected_parent();
reachability::add_block(&mut staging, ctx.hash, selected_parent, &mut reachability_mergeset).unwrap();

// Non-append only stores need to use write locks.
Expand Down

0 comments on commit 4168456

Please sign in to comment.