Skip to content

Commit

Permalink
Suppress quinn warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Jan 29, 2024
1 parent d81f1c9 commit be0c2b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/subspace-farmer/src/bin/subspace-farmer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ mod commands;
mod utils;

use clap::Parser;
use std::fs;
use std::path::PathBuf;
use std::{env, fs};
use subspace_farmer::single_disk_farm::SingleDiskFarm;
use subspace_proof_of_space::chia::ChiaTable;
use tracing::info;
Expand Down Expand Up @@ -55,6 +55,11 @@ enum Command {

#[tokio::main]
async fn main() -> anyhow::Result<()> {
// TODO: This is a hack to work around https://github.com/quinn-rs/quinn/issues/1750, should be
// removed once fixed upstream
if env::var("RUST_LOG").is_err() {
env::set_var("RUST_LOG", "info,quinn_udp=error");
}
tracing_subscriber::registry()
.with(
fmt::layer()
Expand Down
6 changes: 6 additions & 0 deletions crates/subspace-node/src/bin/subspace-node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use sp_core::traits::SpawnEssentialNamed;
use sp_io::SubstrateHostFunctions;
use sp_messenger::messages::ChainId;
use sp_wasm_interface::ExtendedHostFunctions;
use std::env;
use subspace_node::domain::{DomainCli, DomainInstanceStarter, DomainSubcommand};
use subspace_node::{Cli, Subcommand};
use subspace_proof_of_space::chia::ChiaTable;
Expand Down Expand Up @@ -122,6 +123,11 @@ fn pot_external_entropy(
}

fn main() -> Result<(), Error> {
// TODO: This is a hack to work around https://github.com/quinn-rs/quinn/issues/1750, should be
// removed once fixed upstream
if env::var("RUST_LOG").is_err() {
env::set_var("RUST_LOG", "info,quinn_udp=error");
}
let mut cli = Cli::from_args();
// Force UTC logs for Subspace node
cli.run.shared_params.use_utc_log_time = true;
Expand Down

0 comments on commit be0c2b6

Please sign in to comment.