aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-23 23:55:54 +0800
committerobscuren <geffobscura@gmail.com>2014-09-23 23:55:54 +0800
commitbc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7 (patch)
tree9b7e18c2a5ab32476ba891941576c36a00bb0731 /ethchain
parentb73c07dd806f0fe48ac96b142cc40d480496f2cf (diff)
parent6800c3665a50f7ac624f4ecbaa474b8a81336143 (diff)
downloadgo-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar.gz
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar.bz2
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar.lz
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar.xz
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.tar.zst
go-tangerine-bc1a173d2f5e44916b9c6a2ae746c43ce1cef6f7.zip
Merge branch 'hotfix/0.6.5-3' into develop
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/transaction_pool.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go
index 9a6322432..0f7e85982 100644
--- a/ethchain/transaction_pool.go
+++ b/ethchain/transaction_pool.go
@@ -27,6 +27,8 @@ const (
minGasPrice = 1000000
)
+var MinGasPrice = big.NewInt(10000000000000)
+
type TxMsg struct {
Tx *Transaction
Type TxMsgTy
@@ -103,6 +105,10 @@ func (pool *TxPool) ValidateTransaction(tx *Transaction) error {
return fmt.Errorf("[TXPL] Invalid recipient. len = %d", len(tx.Recipient))
}
+ 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.StateManager().procState.GetAccount(tx.Sender())
sender := pool.Ethereum.StateManager().CurrentState().GetAccount(tx.Sender())