Browse Source

Merge pull request #102 from comit-network/replace-all-prints

Replace all the remaining println with tracing logs
fix-bad-api-calls
Daniel Karzel 3 years ago
committed by GitHub
parent
commit
21b17b1db5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      daemon/src/taker_cfd_actor.rs
  2. 5
      daemon/src/wallet.rs

4
daemon/src/taker_cfd_actor.rs

@ -151,7 +151,7 @@ pub fn new(
inbox.send(msg).unwrap();
}
Command::CfdSetupCompleted { order_id, dlc } => {
println!("Setup complete, publishing on chain now...");
tracing::info!("Setup complete, publishing on chain now");
current_contract_setup = None;
@ -174,7 +174,7 @@ pub fn new(
let txid = wallet.try_broadcast_transaction(dlc.lock).await.unwrap();
println!("Lock transaction published with txid {}", txid);
tracing::info!("Lock transaction published with txid {}", txid);
// TODO: tx monitoring, once confirmed with x blocks transition the Cfd to
// Open

5
daemon/src/wallet.rs

@ -105,7 +105,10 @@ impl Wallet {
let error_code = match parse_rpc_protocol_error_code(value) {
Ok(error_code) => error_code,
Err(inner) => {
eprintln!("Failed to parse error code from RPC message: {}", inner);
tracing::error!(
"Failed to parse error code from RPC message: {}",
inner
);
return Err(anyhow!(e));
}
};

Loading…
Cancel
Save