aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'dex/app.go')
-rw-r--r--dex/app.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/dex/app.go b/dex/app.go
index d82d46658..3f580f12e 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -181,6 +181,7 @@ func (d *DexconApp) preparePayload(ctx context.Context, position coreTypes.Posit
}
blockGasLimit := new(big.Int).SetUint64(d.gov.DexconConfiguration(position.Round).BlockGasLimit)
+ minGasPrice := d.gov.DexconConfiguration(position.Round).MinGasPrice
blockGasUsed := new(big.Int)
allTxs := make([]*types.Transaction, 0, 10000)
@@ -216,6 +217,11 @@ addressMap:
// Warning: the pending tx will also affect by syncing, so startIndex maybe negative
for i := startIndex; i >= 0 && i < len(txs); i++ {
tx := txs[i]
+ if minGasPrice.Cmp(tx.GasPrice()) > 0 {
+ log.Error("Invalid gas price minGas(%v) > get(%v)", minGasPrice, tx.GasPrice())
+ break
+ }
+
intrGas, err := core.IntrinsicGas(tx.Data(), tx.To() == nil, true)
if err != nil {
log.Error("Failed to calculate intrinsic gas", "error", err)