diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-05 06:54:07 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-05 06:54:07 +0800 |
commit | 8dbca75d85553f2d9451ee563a919850f05ea1dd (patch) | |
tree | 31fbd960506f216eb0c0dc394b1ce7b4014210d5 /core/transaction_pool.go | |
parent | 3db9c8007086e0735695a6477c21056737519db9 (diff) | |
download | dexon-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.gz dexon-8dbca75d85553f2d9451ee563a919850f05ea1dd.tar.zst dexon-8dbca75d85553f2d9451ee563a919850f05ea1dd.zip |
Skip mining on transactions that don't meet the min accepted gas price
Diffstat (limited to 'core/transaction_pool.go')
-rw-r--r-- | core/transaction_pool.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/transaction_pool.go b/core/transaction_pool.go index c48d3d8a4..1d1f478e4 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -115,10 +115,6 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { return fmt.Errorf("tx.v != (28 || 27)") } - if tx.GasPrice.Cmp(MinGasPrice) < 0 { - return fmt.Errorf("Gas price to low. Require %v > Got %v", MinGasPrice, tx.GasPrice) - } - // Get the sender sender := pool.Ethereum.BlockManager().CurrentState().GetAccount(tx.Sender()) @@ -169,6 +165,10 @@ func (self *TxPool) Add(tx *types.Transaction) error { return nil } +func (self *TxPool) Size() int { + return self.pool.Len() +} + func (pool *TxPool) CurrentTransactions() []*types.Transaction { pool.mutex.Lock() defer pool.mutex.Unlock() |