Skip to content

Commit

Permalink
Merge pull request #553 from LayerXcom/feature/log-level
Browse files Browse the repository at this point in the history
ログレベル修正
  • Loading branch information
osuketh authored Apr 5, 2021
2 parents 4663776 + 6134cc5 commit 631bb6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions modules/anonify-eth-driver/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use parking_lot::RwLock;
use std::collections::HashMap;
use std::sync::Arc;
use tracing::info;
use tracing::debug;
use web3::types::Address as ContractAddr;

type BlockNum = u64;
Expand Down Expand Up @@ -31,13 +31,13 @@ impl InnerEventCache {
contract_addr: ContractAddr,
block_num: BlockNum,
) -> Option<BlockNum> {
info!("Insert: Cached block number: {}", block_num);
debug!("Insert: Cached block number: {}", block_num);
self.block_num_counter.insert(contract_addr, block_num)
}

pub fn get_latest_block_num(&self, contract_addr: ContractAddr) -> Option<BlockNum> {
let block_num = self.block_num_counter.get(&contract_addr).map(|e| *e);
info!("Get: Cached block number: {:?}", block_num);
debug!("Get: Cached block number: {:?}", block_num);
block_num
}
}
4 changes: 2 additions & 2 deletions modules/anonify-eth-driver/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use frame_sodium::{SodiumCiphertext, SodiumPubKey};
use parking_lot::RwLock;
use sgx_types::sgx_enclave_id_t;
use std::{fmt::Debug, path::Path, sync::Arc, time};
use tracing::{error, info};
use tracing::{error, info, debug};
use web3::{
contract::Options,
types::{Address, TransactionReceipt, H256},
Expand Down Expand Up @@ -130,7 +130,7 @@ impl Dispatcher {
.fetch_events(fetch_ciphertext_ecall_cmd, fetch_handshake_ecalll_cmd)
.await
{
Ok(updated_states) => info!("State updated: {:?}", updated_states),
Ok(updated_states) => debug!("State updated: {:?}", updated_states),
Err(err) => error!("event fetched error: {:?}", err),
};
actix_rt::time::delay_for(time::Duration::from_millis(sync_time)).await;
Expand Down

0 comments on commit 631bb6d

Please sign in to comment.