Skip to content

Commit

Permalink
do it (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos authored Mar 3, 2025
1 parent 3f90527 commit 4043f6d
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 191 deletions.
173 changes: 0 additions & 173 deletions auction-server/src/opportunity/repository/db.rs

This file was deleted.

10 changes: 3 additions & 7 deletions auction-server/src/opportunity/repository/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use {

mod add_opportunity;
mod add_spoof_info;
mod db;
mod get_express_relay_metadata;
mod get_in_memory_opportunities;
mod get_in_memory_opportunities_by_key;
Expand All @@ -26,17 +25,14 @@ mod refresh_in_memory_opportunity;
mod remove_opportunities;
mod remove_opportunity;

pub use {
db::*,
models::*,
};
pub use models::*;

pub const OPPORTUNITY_PAGE_SIZE_CAP: usize = 100;

#[derive(Debug)]
pub struct Repository<T: InMemoryStore> {
pub in_memory_store: T,
pub db: Box<dyn OpportunityTable<T>>,
pub db: Box<dyn Database<T>>,
}

pub trait InMemoryStore:
Expand Down Expand Up @@ -109,7 +105,7 @@ impl Deref for InMemoryStoreSvm {
}

impl<T: InMemoryStore> Repository<T> {
pub fn new(db: impl OpportunityTable<T>) -> Self {
pub fn new(db: impl Database<T>) -> Self {
Self {
in_memory_store: T::new(),
db: Box::new(db),
Expand Down
Loading

0 comments on commit 4043f6d

Please sign in to comment.