From bde6de23cf6410da4970acb7e834d6d5e27b3800 Mon Sep 17 00:00:00 2001 From: shaorongqiang Date: Thu, 26 Sep 2024 12:55:06 +0800 Subject: [PATCH] fix lint --- src/components/abciapp/src/abci/server/callback/mod.rs | 1 + src/components/abciapp/src/api/query_server/query_api/mod.rs | 2 +- src/components/contracts/modules/ethereum/src/impls.rs | 3 +-- src/ledger/src/store/mod.rs | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/abciapp/src/abci/server/callback/mod.rs b/src/components/abciapp/src/abci/server/callback/mod.rs index 189079e57..151abbb07 100644 --- a/src/components/abciapp/src/abci/server/callback/mod.rs +++ b/src/components/abciapp/src/abci/server/callback/mod.rs @@ -22,6 +22,7 @@ use { ResponseEndBlock, ResponseInfo, ResponseInitChain, ResponseQuery, }, chrono::Local, + chrono::Utc, config::abci::global_cfg::CFG, enterprise_web3::{ ALLOWANCES, BALANCE_MAP, BLOCK, CODE_MAP, NONCE_MAP, PG_CLIENT, RECEIPTS, 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 }) }