Skip to content

Commit

Permalink
using directdbwriter to fix db writing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Aug 5, 2024
1 parent eaa4c7c commit c8f2a3a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions flexidag/src/consensusdb/consensus_reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,11 @@ impl ReachabilityStore for DbReachabilityStore {
capacity,
0,
));
let mut batch = WriteBatch::default();

self.access
.write(BatchDbWriter::new(&mut batch), origin, data)?;
.write(DirectDbWriter::new(&self.db), origin, data)?;
self.reindex_root
.write(BatchDbWriter::new(&mut batch), &origin)?;
self.db
.raw_write_batch(batch)
.map_err(|e| StoreError::DBIoError(e.to_string()))?;
.write(DirectDbWriter::new(&self.db), &origin)?;

self.children_store.initialize(origin);
self.fcs_store.initialize(origin);
Expand Down

0 comments on commit c8f2a3a

Please sign in to comment.