Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/abciapp/src/abci/server/callback/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions src/components/contracts/modules/ethereum/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ impl<C: Config> App<C> {
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
}),
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/ledger/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}

Expand Down
Loading