diff --git a/src/components/abciapp/src/abci/server/callback/mod.rs b/src/components/abciapp/src/abci/server/callback/mod.rs index b6a8eee17..151abbb07 100644 --- a/src/components/abciapp/src/abci/server/callback/mod.rs +++ b/src/components/abciapp/src/abci/server/callback/mod.rs @@ -22,10 +22,11 @@ use { ResponseEndBlock, ResponseInfo, ResponseInitChain, ResponseQuery, }, chrono::Local, + chrono::Utc, config::abci::global_cfg::CFG, enterprise_web3::{ - ALLOWANCES, BALANCE_MAP, BLOCK, CODE_MAP, NONCE_MAP, RECEIPTS, - PG_CLIENT, STATE_UPDATE_LIST, TOTAL_ISSUANCE, TXS, WEB3_SERVICE_START_HEIGHT, + ALLOWANCES, BALANCE_MAP, BLOCK, CODE_MAP, NONCE_MAP, PG_CLIENT, RECEIPTS, + STATE_UPDATE_LIST, TOTAL_ISSUANCE, TXS, WEB3_SERVICE_START_HEIGHT, }, fp_storage::hash::{Sha256, StorageHasher}, fp_storage::BorrowMut, @@ -659,6 +660,8 @@ pub fn commit(s: &mut ABCISubmissionServer, req: &RequestCommit) -> ResponseComm info!(target: "abcitime", "catch_up height:{}, catch_up:{}-commit:{}={}", td_height, catch_up, commit, catch_up - commit); if CFG.enable_enterprise_web3 && td_height as u64 > *WEB3_SERVICE_START_HEIGHT { + let begin_save_db = Utc::now().timestamp(); + info!(target: "save_db_time", "begin_save_db:{}", begin_save_db); let height = td_height as u32; let setter = PG_CLIENT.lock().expect("PG_CLIENT error"); @@ -767,6 +770,8 @@ pub fn commit(s: &mut ABCISubmissionServer, req: &RequestCommit) -> ResponseComm .set_height(height) .map_err(|e| eg!("set redis error: {:?}", e))); } + let end_save_db = Utc::now().timestamp(); + info!(target: "save_db_time", "end_save_db:{} - begin_save_db:{} = {}", begin_save_db, end_save_db, end_save_db - begin_save_db); } r diff --git a/src/components/abciapp/src/api/query_server/query_api/mod.rs b/src/components/abciapp/src/api/query_server/query_api/mod.rs index e90d15ae2..496ca09a3 100644 --- a/src/components/abciapp/src/api/query_server/query_api/mod.rs +++ b/src/components/abciapp/src/api/query_server/query_api/mod.rs @@ -651,7 +651,7 @@ impl QueryApi { }); for (host, port) in addrs.iter() { - hdr = hdr.bind(&format!("{host}:{port}")).c(d!())? + hdr = hdr.bind(format!("{host}:{port}")).c(d!())? } hdr.run(); diff --git a/src/components/contracts/modules/ethereum/src/impls.rs b/src/components/contracts/modules/ethereum/src/impls.rs index f28cde195..15b8b6991 100644 --- a/src/components/contracts/modules/ethereum/src/impls.rs +++ b/src/components/contracts/modules/ethereum/src/impls.rs @@ -54,9 +54,8 @@ impl App { let mut txn_signers = ctx.eth_cache.current.write(); match txn_signers.get(&transaction_hash) { Some(signer) => *signer, - None => Self::recover_signer(transaction).map(|signer| { + None => Self::recover_signer(transaction).inspect(|&signer| { txn_signers.insert(transaction_hash, Some(signer)); - signer }), } } diff --git a/src/ledger/src/store/mod.rs b/src/ledger/src/store/mod.rs index e739c90d9..c44ae986f 100644 --- a/src/ledger/src/store/mod.rs +++ b/src/ledger/src/store/mod.rs @@ -120,10 +120,9 @@ impl LedgerState { .check_txn_effects(&txe) .c(d!()) .and_then(|_| block.add_txn_effect(txe).c(d!())) - .map(|tmpid| { + .inspect(|tmpid| { // NOTE: set at the last position block.staking_simulator.coinbase_check_and_pay(&tx); - tmpid }) }