mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-07 22:04:03 -05:00
replace log imports with tracing everywhere
This commit is contained in:
@@ -21,8 +21,8 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use log::{debug, error, info, warn};
|
||||
use smol::lock::Mutex;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::{debug, error, info};
|
||||
use smol::{fs::read_to_string, stream::StreamExt};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::{debug, error, info};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -25,7 +25,7 @@ use darkfi::{
|
||||
validator::ValidatorPtr,
|
||||
Result,
|
||||
};
|
||||
use log::info;
|
||||
use tracing::info;
|
||||
|
||||
/// Block proposal broadcast protocol
|
||||
mod protocol_proposal;
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error};
|
||||
use smol::{channel::Sender, lock::RwLock};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
impl_p2p_message,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::{BlockInfo, Header, HeaderHash},
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::{debug, error};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
net::{
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::{collections::HashSet, time::Instant};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, info, warn};
|
||||
use smol::lock::MutexGuard;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -23,8 +23,8 @@ use darkfi_sdk::{
|
||||
tx::TransactionHash,
|
||||
};
|
||||
use darkfi_serial::{deserialize_async, serialize_async};
|
||||
use log::{debug, error};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
rpc::jsonrpc::{
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
use darkfi_serial::deserialize_async;
|
||||
use log::{error, warn};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use darkfi::{
|
||||
rpc::jsonrpc::{
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use darkfi::rpc::jsonrpc::{ErrorCode, JsonError, JsonResponse, JsonResult};
|
||||
use log::error;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::error;
|
||||
|
||||
use crate::DarkfiNode;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use darkfi_sdk::{
|
||||
pasta::{group::ff::PrimeField, pallas},
|
||||
};
|
||||
use darkfi_serial::serialize_async;
|
||||
use log::{error, info};
|
||||
use tracing::{error, info};
|
||||
|
||||
use crate::{
|
||||
task::{garbage_collect_task, miner::MinerRewardsRecipientConfig, miner_task, sync_task},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use darkfi::{error::TxVerifyFailed, validator::verification::verify_transactions, Error, Result};
|
||||
use darkfi_sdk::crypto::MerkleTree;
|
||||
use log::{debug, error, info};
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use crate::DarkfiNodePtr;
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ use darkfi_sdk::{
|
||||
ContractCall,
|
||||
};
|
||||
use darkfi_serial::{serialize_async, Encodable};
|
||||
use log::{error, info};
|
||||
use num_bigint::BigUint;
|
||||
use rand::rngs::OsRng;
|
||||
use smol::channel::{Receiver, Sender};
|
||||
use tracing::{error, info};
|
||||
|
||||
use crate::{proto::ProposalMessage, task::garbage_collect_task, DarkfiNodePtr};
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ use darkfi::{
|
||||
util::encoding::base64, validator::consensus::Proposal, Error, Result,
|
||||
};
|
||||
use darkfi_serial::serialize_async;
|
||||
use log::{debug, info, warn};
|
||||
use rand::{prelude::SliceRandom, rngs::OsRng};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
use crate::{
|
||||
proto::{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
use log::{debug, error, info};
|
||||
use smol::{channel::Receiver, lock::RwLock};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::BlockDifficulty,
|
||||
|
||||
@@ -32,8 +32,8 @@ use darkfi_sdk::{
|
||||
crypto::{pasta_prelude::FromUniformBytes, poseidon_hash, MerkleTree},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::info;
|
||||
use rand::{rngs::OsRng, CryptoRng, RngCore};
|
||||
use tracing::info;
|
||||
|
||||
pub const RLN_APP_IDENTIFIER: pallas::Base = pallas::Base::from_raw([4242, 0, 0, 0]);
|
||||
pub const RLN_TRAPDOOR_DERIVATION_PATH: pallas::Base = pallas::Base::from_raw([4211, 0, 0, 0]);
|
||||
|
||||
@@ -39,7 +39,6 @@ use darkfi_sdk::{
|
||||
};
|
||||
use darkfi_serial::{deserialize_async, serialize_async};
|
||||
use futures::FutureExt;
|
||||
use log::{debug, error, info, warn};
|
||||
use sled_overlay::sled;
|
||||
use smol::{
|
||||
io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader},
|
||||
@@ -47,6 +46,7 @@ use smol::{
|
||||
net::SocketAddr,
|
||||
prelude::{AsyncRead, AsyncWrite},
|
||||
};
|
||||
use tracing::{debug, error, info, warn};
|
||||
|
||||
use super::{
|
||||
server::{IrcServer, MAX_MSG_LEN},
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
use std::{collections::HashSet, sync::atomic::Ordering::SeqCst};
|
||||
|
||||
use darkfi::Result;
|
||||
use log::{error, info};
|
||||
use tracing::{error, info};
|
||||
|
||||
use super::{
|
||||
client::{Client, ReplyType},
|
||||
|
||||
@@ -38,7 +38,6 @@ use futures_rustls::{
|
||||
rustls::{self, pki_types::PrivateKeyDer},
|
||||
TlsAcceptor,
|
||||
};
|
||||
use log::{debug, error, info, warn};
|
||||
use sled_overlay::sled;
|
||||
use smol::{
|
||||
fs,
|
||||
@@ -47,6 +46,7 @@ use smol::{
|
||||
prelude::{AsyncRead, AsyncWrite},
|
||||
Executor,
|
||||
};
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use super::{client::Client, IrcChannel, IrcContact, Priv, Privmsg};
|
||||
|
||||
@@ -33,12 +33,12 @@ use darkfi::{
|
||||
};
|
||||
use darkfi_sdk::crypto::pasta_prelude::PrimeField;
|
||||
|
||||
use log::{debug, error, info};
|
||||
use rand::rngs::OsRng;
|
||||
use settings::list_configured_contacts;
|
||||
use sled_overlay::sled;
|
||||
use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::{debug, error, info};
|
||||
use url::Url;
|
||||
|
||||
const CONFIG_FILE: &str = "darkirc_config.toml";
|
||||
|
||||
@@ -29,8 +29,8 @@ use darkfi::{
|
||||
},
|
||||
system::StoppableTaskPtr,
|
||||
};
|
||||
use log::debug;
|
||||
use smol::lock::MutexGuard;
|
||||
use tracing::debug;
|
||||
|
||||
use super::DarkIrc;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ use std::{
|
||||
use crypto_box::PublicKey;
|
||||
use darkfi::{Error::ParseFailed, Result};
|
||||
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
|
||||
use log::info;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
crypto::rln::{closest_epoch, RlnIdentity},
|
||||
|
||||
@@ -29,9 +29,9 @@ use darkfi_sdk::{
|
||||
pasta::pallas,
|
||||
};
|
||||
use darkfi_serial::{deserialize, serialize};
|
||||
use log::error;
|
||||
use num_bigint::BigUint;
|
||||
use sled_overlay::{sled, SledDbOverlay, SledDbOverlayStateDiff};
|
||||
use tracing::error;
|
||||
|
||||
pub const SLED_SCANNED_BLOCKS_TREE: &[u8] = b"_scanned_blocks";
|
||||
pub const SLED_STATE_INVERSE_DIFF_TREE: &[u8] = b"_state_inverse_diff";
|
||||
|
||||
@@ -22,11 +22,11 @@ use std::{
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use log::info;
|
||||
use prettytable::{format, row, Table};
|
||||
use rand::rngs::OsRng;
|
||||
use smol::{fs::read_to_string, stream::StreamExt};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::info;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -21,11 +21,11 @@ use std::{
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use log::{debug, error};
|
||||
use rusqlite::{
|
||||
types::{ToSql, Value},
|
||||
Connection,
|
||||
};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::error::{WalletDbError, WalletDbResult};
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ use std::{
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use log::{debug, error};
|
||||
use serde::Deserialize;
|
||||
use structopt::StructOpt;
|
||||
use tracing::{debug, error};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{rpc::settings::RpcSettingsOpt, util::file::load_file, Error, Result};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
use log::error;
|
||||
use tracing::error;
|
||||
|
||||
use darkfi::{
|
||||
error::RpcError,
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::{collections::HashSet, path::Path, sync::Arc};
|
||||
|
||||
use log::{error, info};
|
||||
use smol::{lock::Mutex, stream::StreamExt};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::{error, info};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::{collections::HashSet, sync::Arc, time::Instant};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, trace, warn};
|
||||
use smol::lock::{MutexGuard, RwLock};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, trace, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use log::{debug, warn};
|
||||
use sled_overlay::sled::{transaction::ConflictableTransactionError, Transactional};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::{
|
||||
|
||||
@@ -21,9 +21,9 @@ use std::{
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use log::info;
|
||||
use tar::Archive;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::info;
|
||||
|
||||
use darkfi::{
|
||||
blockchain::BlockchainOverlay, validator::utils::deploy_native_contracts, Error, Result,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::Result;
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
use std::{sync::Arc, time::Instant};
|
||||
|
||||
use log::{debug, error, info, warn};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use log::{debug, error};
|
||||
use smol::io::Cursor;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::{
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
|
||||
use log::debug;
|
||||
use sled_overlay::{sled, SledDbOverlay};
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{blockchain::SledDbOverlayPtr, Error, Result};
|
||||
use darkfi_sdk::crypto::ContractId;
|
||||
|
||||
@@ -21,8 +21,8 @@ use std::{
|
||||
sync::{Arc, Mutex, MutexGuard},
|
||||
};
|
||||
|
||||
use log::{debug, info};
|
||||
use sled_overlay::{sled, SledDbOverlay};
|
||||
use tracing::{debug, info};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::SledDbOverlayPtr,
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use log::info;
|
||||
use sled_overlay::sled;
|
||||
use tracing::info;
|
||||
|
||||
use darkfi::{blockchain::Blockchain, error::Result, util::path::expand_path};
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
*/
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use log::error;
|
||||
use simplelog::{ColorChoice, TermLogger, TerminalMode};
|
||||
use smol::lock::RwLock;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
@@ -26,6 +24,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
use termcolor::{StandardStream, WriteColor};
|
||||
use tracing::error;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -23,11 +23,11 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use log::{error, info, warn};
|
||||
use rand::{prelude::SliceRandom, rngs::OsRng};
|
||||
use sha2::{Digest, Sha256};
|
||||
use smol::lock::RwLock;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::debug;
|
||||
use num_bigint::BigUint;
|
||||
use rand::{rngs::OsRng, Rng};
|
||||
use tracing::debug;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -23,11 +23,11 @@ use std::{
|
||||
};
|
||||
|
||||
use futures::{future::FutureExt, pin_mut, select};
|
||||
use log::{error, info, warn};
|
||||
use rand::{
|
||||
prelude::{IteratorRandom, SliceRandom},
|
||||
rngs::OsRng,
|
||||
};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use darkfi::{
|
||||
dht::DhtNode,
|
||||
|
||||
@@ -23,13 +23,13 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use log::{error, info, warn};
|
||||
use sled_overlay::sled;
|
||||
use smol::{
|
||||
channel,
|
||||
fs::{self, OpenOptions},
|
||||
lock::RwLock,
|
||||
};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use darkfi::{
|
||||
dht::{tasks as dht_tasks, Dht, DhtHandler, DhtSettings},
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use log::{debug, error, info, warn};
|
||||
use sled_overlay::sled;
|
||||
use smol::{stream::StreamExt, Executor};
|
||||
use std::sync::Arc;
|
||||
use structopt_toml::StructOptToml;
|
||||
use tracing::{debug, error, info, warn};
|
||||
|
||||
use darkfi::{
|
||||
async_daemonize,
|
||||
|
||||
@@ -21,10 +21,10 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use log::info;
|
||||
use rand::rngs::OsRng;
|
||||
use smol::lock::RwLock;
|
||||
use structopt::StructOpt;
|
||||
use tracing::info;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{system::ExecutorPtr, Error, Result};
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, info};
|
||||
use smol::Executor;
|
||||
use std::{path::StripPrefixError, sync::Arc};
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
dht::DhtHandler,
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::error;
|
||||
use smol::lock::{Mutex, MutexGuard};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
@@ -25,6 +24,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::error;
|
||||
|
||||
use darkfi::{
|
||||
dht::DhtNode,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::{error, info, warn};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use darkfi::{
|
||||
dht::{DhtHandler, DhtNode},
|
||||
|
||||
@@ -23,8 +23,8 @@ use darkfi::{
|
||||
};
|
||||
use darkfi_serial::{deserialize, serialize};
|
||||
use genevd::GenEvent;
|
||||
use log::debug;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::debug;
|
||||
|
||||
pub struct Gen {
|
||||
pub rpc_client: RpcClient,
|
||||
|
||||
@@ -31,10 +31,10 @@ use darkfi::{
|
||||
util::path::expand_path,
|
||||
Error, Result,
|
||||
};
|
||||
use log::{debug, error, info};
|
||||
use sled_overlay::sled;
|
||||
use smol::{fs, lock::RwLock, stream::StreamExt};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
mod rpc;
|
||||
use rpc::JsonRpcInterface;
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error};
|
||||
use smol::lock::{Mutex, MutexGuard};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use darkfi::{
|
||||
event_graph::{proto::EventPut, Event, EventGraphPtr},
|
||||
|
||||
@@ -24,7 +24,6 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, info, warn};
|
||||
use semver::Version;
|
||||
use smol::{
|
||||
lock::{Mutex, MutexGuard},
|
||||
@@ -35,6 +34,7 @@ use structopt::StructOpt;
|
||||
use structopt_toml::StructOptToml;
|
||||
use tinyjson::JsonValue;
|
||||
use toml::Value;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
use log::{error, info};
|
||||
use smol::{
|
||||
channel::{Receiver, Sender},
|
||||
lock::Mutex,
|
||||
};
|
||||
use tracing::{error, info};
|
||||
|
||||
use darkfi::{
|
||||
rpc::{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::info;
|
||||
use smol::{stream::StreamExt, Executor};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::info;
|
||||
|
||||
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use log::{debug, error, info};
|
||||
use num_bigint::BigUint;
|
||||
use smol::lock::MutexGuard;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
blockchain::BlockInfo,
|
||||
|
||||
@@ -24,9 +24,9 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, info, warn};
|
||||
use smol::lock::{Mutex, MutexGuard};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
use darkfi::{
|
||||
event_graph::EventGraphPtr,
|
||||
|
||||
@@ -36,12 +36,12 @@ use darkfi_serial::{
|
||||
};
|
||||
use futures::{select, FutureExt};
|
||||
use libc::mkfifo;
|
||||
use log::{debug, error, info};
|
||||
use rand::rngs::OsRng;
|
||||
use sled_overlay::sled;
|
||||
use smol::{fs, stream::StreamExt};
|
||||
use structopt_toml::StructOptToml;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
async_daemonize,
|
||||
|
||||
@@ -23,8 +23,8 @@ use std::{
|
||||
};
|
||||
|
||||
use chrono::{TimeZone, Utc};
|
||||
use log::debug;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::util::{
|
||||
file::{load_json_file, save_json_file},
|
||||
|
||||
@@ -24,8 +24,8 @@ use std::{
|
||||
};
|
||||
|
||||
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
|
||||
use log::debug;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{
|
||||
util::{
|
||||
|
||||
@@ -22,7 +22,7 @@ use std::{
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{Error, Result};
|
||||
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
// ANCHOR: imports
|
||||
use log::{debug, error, info};
|
||||
use smol::{lock::Mutex, stream::StreamExt};
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
async_daemonize, cli_desc, net,
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
// ANCHOR: protocol_dchat
|
||||
use async_trait::async_trait;
|
||||
use darkfi::{net, Result};
|
||||
use log::debug;
|
||||
use smol::Executor;
|
||||
use std::sync::Arc;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::dchatmsg::{DchatMsg, DchatMsgsBuffer};
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use async_trait::async_trait;
|
||||
use darkfi::{net::P2pPtr, system::StoppableTaskPtr};
|
||||
use log::debug;
|
||||
use smol::lock::MutexGuard;
|
||||
use std::collections::HashSet;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::rpc::{
|
||||
jsonrpc::{ErrorCode, JsonError, JsonRequest, JsonResponse, JsonResult},
|
||||
|
||||
@@ -39,7 +39,7 @@ use darkfi::{
|
||||
};
|
||||
use darkfi_serial::{AsyncDecodable, AsyncEncodable};
|
||||
use futures::{FutureExt, AsyncWriteExt};
|
||||
use log::{debug, error, info};
|
||||
use tracing::{debug, error, info};
|
||||
use sled_overlay::sled;
|
||||
use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
|
||||
use std::{collections::HashSet, path::PathBuf, sync::Arc};
|
||||
|
||||
@@ -29,7 +29,7 @@ use darkfi::{
|
||||
},
|
||||
system::StoppableTaskPtr,
|
||||
};
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
use smol::lock::MutexGuard;
|
||||
|
||||
use super::Daemon;
|
||||
|
||||
@@ -26,7 +26,7 @@ use darkfi_serial::{
|
||||
async_trait, deserialize_async_partial, AsyncDecodable, AsyncEncodable, SerialDecodable,
|
||||
SerialEncodable,
|
||||
};
|
||||
use log::{error, info};
|
||||
use tracing::{error, info};
|
||||
use sled_overlay::sled;
|
||||
use smol::fs;
|
||||
use url::Url;
|
||||
|
||||
@@ -27,7 +27,7 @@ use darkfi::{
|
||||
use darkfi_serial::{
|
||||
async_trait, deserialize_async, serialize_async, SerialDecodable, SerialEncodable,
|
||||
};
|
||||
use log::{debug, error, info};
|
||||
use tracing::{debug, error, info};
|
||||
use sled_overlay::{sled, SledTreeOverlay};
|
||||
use smol::{
|
||||
lock::{OnceCell, RwLock},
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
use log::info;
|
||||
use smol::stream::StreamExt;
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::info;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -27,7 +27,7 @@ use darkfi::{
|
||||
system::{ExecutorPtr, Publisher, StoppableTask},
|
||||
Error, Result,
|
||||
};
|
||||
use log::{error, info};
|
||||
use tracing::{error, info};
|
||||
use url::Url;
|
||||
|
||||
use crate::DamCli;
|
||||
|
||||
@@ -27,9 +27,9 @@ use darkfi::{
|
||||
system::{ExecutorPtr, StoppableTask, StoppableTaskPtr},
|
||||
Error, Result,
|
||||
};
|
||||
use log::{debug, error, info};
|
||||
use smol::lock::Mutex;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use crate::proto::{
|
||||
protocol_bar::Bar,
|
||||
|
||||
@@ -21,8 +21,8 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use log::{debug, error, info};
|
||||
use smol::lock::Mutex;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
net::settings::Settings,
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_std::prelude::StreamExt;
|
||||
use log::info;
|
||||
use smol::Executor;
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::info;
|
||||
|
||||
use darkfi::{
|
||||
async_daemonize, cli_desc, net::settings::SettingsOpt, rpc::settings::RpcSettingsOpt, Error,
|
||||
|
||||
@@ -24,7 +24,7 @@ use darkfi::{
|
||||
system::ExecutorPtr,
|
||||
Result,
|
||||
};
|
||||
use log::info;
|
||||
use tracing::info;
|
||||
|
||||
/// `Foo` messages broadcast protocol
|
||||
pub mod protocol_foo;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, info};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
impl_p2p_message,
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::{debug, error, info};
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
|
||||
use darkfi::{
|
||||
impl_p2p_message,
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::debug;
|
||||
use smol::lock::MutexGuard;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{
|
||||
net::P2pPtr,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
use log::{error, info};
|
||||
use tracing::{error, info};
|
||||
use rand::{rngs::OsRng, Rng};
|
||||
use smol::{stream::StreamExt, Executor};
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
use log::{error, info};
|
||||
use smol::lock::Mutex;
|
||||
use tracing::{error, info};
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_std::prelude::StreamExt;
|
||||
use log::info;
|
||||
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
|
||||
use tracing::info;
|
||||
use url::Url;
|
||||
|
||||
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};
|
||||
|
||||
@@ -30,9 +30,9 @@ use darkfi::{
|
||||
};
|
||||
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
|
||||
use darkfi_serial::serialize;
|
||||
use log::{debug, error, info};
|
||||
use smol::lock::MutexGuard;
|
||||
use tinyjson::JsonValue;
|
||||
use tracing::{debug, error, info};
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -26,8 +26,8 @@ use darkfi_sdk::{
|
||||
monotree::Monotree,
|
||||
};
|
||||
use darkfi_serial::{deserialize, serialize};
|
||||
use log::{debug, error};
|
||||
use sled_overlay::{serial::parse_record, sled, SledDbOverlay};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::{
|
||||
zk::{empty_witnesses, VerifyingKey, ZkCircuit},
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use darkfi_sdk::{monotree::Monotree, tx::TransactionHash};
|
||||
use log::debug;
|
||||
use sled_overlay::{sled, sled::Transactional};
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{tx::Transaction, util::time::Timestamp, Error, Result};
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ use darkfi_sdk::{
|
||||
pasta::pallas,
|
||||
};
|
||||
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{
|
||||
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},
|
||||
|
||||
@@ -22,8 +22,8 @@ use darkfi::{
|
||||
Result,
|
||||
};
|
||||
use darkfi_sdk::{crypto::SecretKey, pasta::pallas};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::model::{Dao, DaoMintParams};
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ use darkfi_sdk::{
|
||||
},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use darkfi::{
|
||||
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},
|
||||
|
||||
@@ -37,8 +37,8 @@ use darkfi_sdk::{
|
||||
},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::info;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::info;
|
||||
|
||||
// Integration test configuration
|
||||
// Holders this test will use:
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use darkfi::{ClientFailed, Result};
|
||||
use darkfi_sdk::{crypto::Keypair, deploy::DeployParamsV1};
|
||||
use log::{debug, error};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::error::DeployError;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use darkfi::Result;
|
||||
use darkfi_sdk::crypto::Keypair;
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::model::LockParamsV1;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use darkfi::Result;
|
||||
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
|
||||
use log::info;
|
||||
use tracing::info;
|
||||
|
||||
#[test]
|
||||
fn deploy_integration() -> Result<()> {
|
||||
|
||||
@@ -22,8 +22,8 @@ use darkfi::{
|
||||
Result,
|
||||
};
|
||||
use darkfi_sdk::crypto::Keypair;
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::model::{MoneyAuthTokenFreezeParamsV1, TokenAttributes};
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ use darkfi::{
|
||||
Result,
|
||||
};
|
||||
use darkfi_sdk::crypto::{note::AeadEncryptedNote, Blind, Keypair};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{
|
||||
client::MoneyNote,
|
||||
|
||||
@@ -25,8 +25,8 @@ use darkfi_sdk::{
|
||||
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::{prelude::SliceRandom, rngs::OsRng};
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{
|
||||
client::{
|
||||
|
||||
@@ -26,8 +26,8 @@ use darkfi_sdk::{
|
||||
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{
|
||||
client::{
|
||||
|
||||
@@ -31,8 +31,8 @@ use darkfi_sdk::{
|
||||
pasta::pallas,
|
||||
};
|
||||
use darkfi_serial::serialize;
|
||||
use log::{debug, error};
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::{
|
||||
client::{
|
||||
|
||||
@@ -22,8 +22,8 @@ use darkfi::{
|
||||
Result,
|
||||
};
|
||||
use darkfi_sdk::pasta::pallas;
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::model::{CoinAttributes, MoneyTokenMintParamsV1, TokenAttributes};
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ use darkfi_sdk::{
|
||||
},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use super::proof::{create_transfer_burn_proof, create_transfer_mint_proof};
|
||||
use crate::{
|
||||
|
||||
@@ -21,8 +21,8 @@ use darkfi_sdk::{
|
||||
crypto::{pasta_prelude::*, Blind, FuncId, Keypair, MerkleTree, PublicKey},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::{debug, error};
|
||||
use rand::{prelude::SliceRandom, rngs::OsRng};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use crate::{
|
||||
client::OwnCoin,
|
||||
|
||||
@@ -29,8 +29,8 @@ use darkfi_sdk::{
|
||||
},
|
||||
pasta::pallas,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::debug;
|
||||
|
||||
use super::{TransferCallInput, TransferCallOutput};
|
||||
use crate::model::{Coin, CoinAttributes, Nullifier};
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
use darkfi::Result;
|
||||
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
|
||||
use log::info;
|
||||
use tracing::info;
|
||||
|
||||
#[test]
|
||||
fn genesis_mint() -> Result<()> {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
use darkfi::Result;
|
||||
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
|
||||
use darkfi_sdk::crypto::BaseBlind;
|
||||
use log::info;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::info;
|
||||
|
||||
#[test]
|
||||
fn mint_pay_swap() -> Result<()> {
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use darkfi::Result;
|
||||
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
|
||||
use darkfi_sdk::crypto::BaseBlind;
|
||||
use log::info;
|
||||
use rand::rngs::OsRng;
|
||||
use tracing::info;
|
||||
|
||||
#[test]
|
||||
fn token_mint() -> Result<()> {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user