diff --git a/consensus/src/model/stores/relations.rs b/consensus/src/model/stores/relations.rs index b77053b33..8ac3dcb55 100644 --- a/consensus/src/model/stores/relations.rs +++ b/consensus/src/model/stores/relations.rs @@ -23,7 +23,7 @@ pub trait RelationsStoreReader { /// Low-level write API for `RelationsStore` pub trait RelationsStore: RelationsStoreReader { - type DefaultWriter: DbWriter + DirectWriter; + type DefaultWriter: DirectWriter; fn default_writer(&self) -> Self::DefaultWriter; fn set_parents(&mut self, writer: impl DbWriter, hash: Hash, parents: BlockHashes) -> Result<(), StoreError>; diff --git a/consensus/src/processes/reachability/tests/mod.rs b/consensus/src/processes/reachability/tests/mod.rs index 2ccf13601..e2317ed17 100644 --- a/consensus/src/processes/reachability/tests/mod.rs +++ b/consensus/src/processes/reachability/tests/mod.rs @@ -18,7 +18,7 @@ use kaspa_consensus_core::{ blockhash::{BlockHashExtensions, BlockHashes, ORIGIN}, BlockHashMap, BlockHashSet, }; -use kaspa_database::prelude::{DbWriter, DirectWriter, StoreError}; +use kaspa_database::prelude::{DirectWriter, StoreError}; use kaspa_hashes::Hash; use std::collections::{ hash_map::Entry::{Occupied, Vacant}, @@ -120,7 +120,7 @@ impl<'a, T: ReachabilityStore + ?Sized, S: RelationsStore + ?Sized> DagBuilder<' self.delete_block_with_writer(self.relations.default_writer(), hash) } - pub fn delete_block_with_writer(&mut self, writer: impl DbWriter + DirectWriter, hash: Hash) -> &mut Self { + pub fn delete_block_with_writer(&mut self, writer: impl DirectWriter, hash: Hash) -> &mut Self { let mergeset = delete_reachability_relations(writer, self.relations, self.reachability, hash); delete_block(self.reachability, hash, &mut mergeset.iter().cloned()).unwrap(); self diff --git a/consensus/src/processes/relations.rs b/consensus/src/processes/relations.rs index 25481258a..662af3ada 100644 --- a/consensus/src/processes/relations.rs +++ b/consensus/src/processes/relations.rs @@ -26,7 +26,7 @@ pub fn init(relations: &mut S) { /// (and writes will not accumulate if the entry gets out of the cache in between the calls) pub fn delete_level_relations(mut writer: W, relations: &mut S, hash: Hash) -> Result<(), StoreError> where - W: DbWriter + DirectWriter, + W: DirectWriter, S: RelationsStore + ?Sized, { let children = relations.get_children(hash)?; // if the first entry was found, we expect all others as well, hence we unwrap below @@ -49,7 +49,7 @@ where /// (and writes will not accumulate if the entry gets out of the cache in between the calls) pub fn delete_reachability_relations(mut writer: W, relations: &mut S, reachability: &U, hash: Hash) -> BlockHashSet where - W: DbWriter + DirectWriter, + W: DirectWriter, S: RelationsStore + ?Sized, U: ReachabilityService + ?Sized, {