Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
598 changes: 5 additions & 593 deletions Cargo-minimal.lock

Large diffs are not rendered by default.

598 changes: 5 additions & 593 deletions Cargo-recent.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion payjoin-directory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ hyper-rustls = { version = "0.27.7", default-features=false, features = ["webpki
hyper-util = { version = "0.1.16", features = ["tokio"] }
ohttp = { package = "bitcoin-ohttp", version = "0.6.0"}
payjoin = { version = "0.24.0", features = ["directory"], default-features = false }
redis = { version = "0.32.5", features = ["aio", "tokio-comp"] }
tokio = { version = "1.47.1", features = ["full"] }
tokio-rustls = { version = "0.26.2", features = ["ring"], default-features = false, optional = true }
tracing = "0.1.41"
Expand All @@ -37,6 +36,7 @@ prometheus = "0.13.4"
clap = { version = "4.5.45", features = ["derive", "env"] }
config = "0.15.14"
serde = { version = "1.0.219", features = ["derive"] }
rand = "0.8"

[dev-dependencies]
tempfile = "3.20.0"
9 changes: 4 additions & 5 deletions payjoin-directory/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ pub struct Cli {
pub timeout: u64,

#[arg(
long = "db-host",
env = "PJ_DB_HOST",
default_value = "localhost:6379",
help = "The redis host to connect to"
long = "storage-dir",
env = "PJ_STORAGE_DIR",
help = "A directory for writing mailbox data."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This is the sqlite database correct? if so its not only mailbox data

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no just files on disk

)]
pub db_host: String,
pub storage_dir: PathBuf,

#[arg(
long = "ohttp-keys",
Expand Down
8 changes: 4 additions & 4 deletions payjoin-directory/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Config {
pub listen_addr: String, // TODO tokio_listener::ListenerAddressLFlag
pub metrics_listen_addr: String, // TODO tokio_listener::ListenerAddressLFlag
pub timeout: Duration,
pub db_host: String,
pub storage_dir: PathBuf,
pub ohttp_keys: PathBuf, // TODO OhttpConfig struct with rotation params, etc
}

Expand All @@ -33,7 +33,7 @@ impl Config {
listen_addr: built_config.get("listen_addr")?,
metrics_listen_addr: built_config.get("metrics_listen_addr")?,
timeout: Duration::from_secs(built_config.get("timeout")?),
db_host: built_config.get("db_host")?,
storage_dir: built_config.get("storage_dir")?,
ohttp_keys: built_config.get("ohttp_keys")?,
})
}
Expand All @@ -47,6 +47,6 @@ fn add_defaults(config: Builder, cli: &Cli) -> Result<Builder, ConfigError> {
Some(format!("localhost:{}", cli.metrics_port)),
)?
.set_override_option("timeout", Some(cli.timeout))?
.set_override_option("db_host", Some(cli.db_host.to_owned()))?
.set_override_option("ohttp_keys", Some(cli.ohttp_keys.to_string_lossy().into_owned()))
.set_override_option("ohttp_keys", Some(cli.ohttp_keys.to_string_lossy().into_owned()))?
.set_override_option("storage_dir", Some(cli.storage_dir.to_string_lossy().into_owned()))
}
140 changes: 0 additions & 140 deletions payjoin-directory/src/db.rs

This file was deleted.

Loading
Loading