Skip to content

Commit

Permalink
pool: rename InternalRelayPool to InnerRelayPool
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Oct 28, 2024
1 parent ad910be commit 382db0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{RelayServiceFlags, SubscribeOptions};
type Relays = HashMap<Url, Relay>;

#[derive(Debug, Clone)]
pub struct InternalRelayPool {
pub struct InnerRelayPool {
database: Arc<DynNostrDatabase>,
relays: Arc<RwLock<Relays>>,
notification_sender: broadcast::Sender<RelayPoolNotification>,
Expand All @@ -34,7 +34,7 @@ pub struct InternalRelayPool {
//opts: RelayPoolOptions,
}

impl AtomicDestroyer for InternalRelayPool {
impl AtomicDestroyer for InnerRelayPool {
fn name(&self) -> Option<String> {
Some(String::from("Relay Pool"))
}
Expand All @@ -49,7 +49,7 @@ impl AtomicDestroyer for InternalRelayPool {
}
}

impl InternalRelayPool {
impl InnerRelayPool {
pub fn with_database<D>(opts: RelayPoolOptions, database: D) -> Self
where
D: IntoNostrDatabase,
Expand Down
8 changes: 4 additions & 4 deletions crates/nostr-relay-pool/src/pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ use tokio::sync::broadcast;
pub use tokio_stream::wrappers::ReceiverStream;

mod error;
mod internal;
mod inner;
pub mod options;
mod output;

pub use self::error::Error;
use self::internal::InternalRelayPool;
use self::inner::InnerRelayPool;
pub use self::options::RelayPoolOptions;
pub use self::output::Output;
use crate::relay::flags::FlagCheck;
Expand Down Expand Up @@ -69,7 +69,7 @@ pub enum RelayPoolNotification {
/// Relay Pool
#[derive(Debug, Clone)]
pub struct RelayPool {
inner: AtomicDestructor<InternalRelayPool>,
inner: AtomicDestructor<InnerRelayPool>,
}

impl Default for RelayPool {
Expand Down Expand Up @@ -101,7 +101,7 @@ impl RelayPool {
D: IntoNostrDatabase,
{
Self {
inner: AtomicDestructor::new(InternalRelayPool::with_database(opts, database)),
inner: AtomicDestructor::new(InnerRelayPool::with_database(opts, database)),
}
}

Expand Down

0 comments on commit 382db0f

Please sign in to comment.