Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-sjtu committed May 27, 2023
1 parent c1d0616 commit f21e75a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/tendermint/mempool/clist_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ func (mem *CListMempool) CheckTx(tx types.Tx, cb func(*abci.Response), txInfo Tx
gasLimit := r.CheckTx.GasWanted
if cfg.DynamicConfig.GetMaxGasUsedPerBlock() > -1 {
txInfo.gasUsed, txInfo.isGasPrecise = mem.txInfoparser.GetTxHistoryGasUsed(tx, gasLimit) // r.CheckTx.GasWanted is gasLimit
if txInfo.gasUsed <= 0 {
txInfo.gasUsed, _ = mem.simulateTx(tx, gasLimit)
}
mem.logger.Info(fmt.Sprintf("mempool.SimulateTx: txhash<%s>, gasLimit<%d>, gasUsed<%d>",
hex.EncodeToString(tx.Hash()), r.CheckTx.GasWanted, txInfo.gasUsed))
}
Expand Down

0 comments on commit f21e75a

Please sign in to comment.