change minGasPrice in function validateTx

This commit is contained in:
Daniel Liu 2023-07-17 18:19:56 +08:00
parent 05ad748307
commit 845d3d49e5

View file

@ -632,7 +632,11 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
// cost == V + GP * GL
balance := pool.currentState.GetBalance(from)
cost := tx.Cost()
minGasPrice := common.MinGasPrice
var number *big.Int = nil
if pool.chain.CurrentHeader() != nil {
number = pool.chain.CurrentHeader().Number
}
minGasPrice := common.GetMinGasPrice(number)
feeCapacity := big.NewInt(0)
if tx.To() != nil {