From 1cb9da8a75a659e40b816686e4cf523987ea819f Mon Sep 17 00:00:00 2001 From: Ashwin Sekar Date: Thu, 12 Dec 2024 17:36:23 +0000 Subject: [PATCH] fix conflicts --- ledger/src/blockstore.rs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 9d942e7886a531..d63e60789290c5 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -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::(slot, &true).unwrap(); return Err(InsertDataShredError::InvalidShred); } } @@ -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(_, _) @@ -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(), @@ -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