Skip to content

Commit

Permalink
Inconsistent blob storage warning was wrongly shown
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Jun 26, 2024
1 parent 1adec6d commit ad752b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aquadoggo_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async fn main() -> anyhow::Result<()> {
fn show_warnings(config: &Configuration, is_temporary_blobs_path: bool) {
if config.network.psk.is_some() && config.network.transport == Transport::QUIC {
warn!(
"Your node is configured with a pre-shared key and uses QUIC transport. Private
"Your node is configured with a pre-shared key and uses QUIC transport. Private
nets are not supported when using QUIC therefore TCP will be enforced. "
);
}
Expand Down Expand Up @@ -103,7 +103,10 @@ fn show_warnings(config: &Configuration, is_temporary_blobs_path: bool) {
warn!("Will not connect to given relay addresses when relay mode is enabled.");
}

if config.database_url != "sqlite::memory:" && is_temporary_blobs_path {
let is_temporary_database =
config.database_url == "sqlite::memory:" || config.database_url.contains("mode=memory");

if !is_temporary_database && is_temporary_blobs_path {
warn!(
"Your database is persisted but blobs _are not_ which might result in unrecoverable
data inconsistency (blob operations are stored but the files themselves are _not_). It is
Expand Down

0 comments on commit ad752b1

Please sign in to comment.