aboutsummaryrefslogtreecommitdiffstats
path: root/core/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-02 19:24:36 +0800
committerobscuren <geffobscura@gmail.com>2015-01-02 19:24:36 +0800
commitae2c90cc2813509a3a2e848584a3a45b568ae064 (patch)
tree42e3cc0d445a89f109b135c7d380a150689e07da /core/transaction_pool.go
parent6cf61039cfdac2595528adb86978465881838c7f (diff)
downloadgo-tangerine-ae2c90cc2813509a3a2e848584a3a45b568ae064.tar.gz
go-tangerine-ae2c90cc2813509a3a2e848584a3a45b568ae064.tar.zst
go-tangerine-ae2c90cc2813509a3a2e848584a3a45b568ae064.zip
Removed value check from tx validation
Diffstat (limited to 'core/transaction_pool.go')
-rw-r--r--core/transaction_pool.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/transaction_pool.go b/core/transaction_pool.go
index 4f91f3575..7f12a296d 100644
--- a/core/transaction_pool.go
+++ b/core/transaction_pool.go
@@ -2,7 +2,6 @@ package core
import (
"fmt"
- "math/big"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
@@ -73,7 +72,7 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error {
v, _, _ := tx.Curve()
if v > 28 || v < 27 {
- return fmt.Errorf("tx.v != (28 || 27)")
+ return fmt.Errorf("tx.v != (28 || 27) => %v", v)
}
// Get the sender
@@ -83,12 +82,17 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error {
}
sender := pool.stateQuery.GetAccount(senderAddr)
+ /* XXX this kind of validation needs to happen elsewhere in the gui when sending txs.
+ Other clients should do their own validation. Value transfer could be throw error
+ but doesn't necessarily invalidate the tx. Gas can still be payed for and miner
+ can still be rewarded for their inclusion and processing.
totAmount := new(big.Int).Set(tx.Value())
// Make sure there's enough in the sender's account. Having insufficient
// funds won't invalidate this transaction but simple ignores it.
if sender.Balance().Cmp(totAmount) < 0 {
return fmt.Errorf("Insufficient amount in sender's (%x) account", tx.From())
}
+ */
return nil
}