Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinSekar committed Dec 12, 2024
1 parent a9cb121 commit 1cb9da8
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,9 +1698,7 @@ impl Blockstore {
// progress. We cannot determine if we have the version that will eventually
// be complete, so we take the conservative approach and mark the slot as dead
// so that replay can dump and repair the correct version.
self.dead_slots_cf
.put_in_batch(write_batch, slot, &true)
.unwrap();
write_batch.put::<cf::DeadSlots>(slot, &true).unwrap();
return Err(InsertDataShredError::InvalidShred);
}
}
Expand Down Expand Up @@ -7824,21 +7822,9 @@ pub mod tests {
ShredSource::Turbine,
)
.is_err());
<<<<<<< HEAD

// No insert, notify duplicate
assert_eq!(duplicates.len(), 1);
=======
let ShredInsertionTracker {
merkle_root_metas,
duplicate_shreds,
write_batch,
..
} = shred_insertion_tracker;

// No insert, notify duplicate, and block is dead
assert_eq!(duplicate_shreds.len(), 1);
>>>>>>> 5564a941ae (blockstore: mark slot as dead on data shred merkle root conflict (#3970))
assert_matches!(
duplicates[0],
PossibleDuplicateShred::MerkleRootConflict(_, _)
Expand Down Expand Up @@ -7899,8 +7885,7 @@ pub mod tests {
fec_set_index + 30,
);

let mut shred_insertion_tracker =
ShredInsertionTracker::new(data_shreds.len(), blockstore.db.batch().unwrap());
let mut write_batch = blockstore.db.batch().unwrap();
blockstore
.check_insert_data_shred(
new_data_shred.clone(),
Expand All @@ -7917,15 +7902,7 @@ pub mod tests {
ShredSource::Turbine,
)
.unwrap();
<<<<<<< HEAD
=======
let ShredInsertionTracker {
merkle_root_metas,
write_batch,
..
} = shred_insertion_tracker;
blockstore.db.write(write_batch).unwrap();
>>>>>>> 5564a941ae (blockstore: mark slot as dead on data shred merkle root conflict (#3970))

// Verify that we still have the merkle root meta for the original shred
// and the new shred
Expand Down

0 comments on commit 1cb9da8

Please sign in to comment.