aboutsummaryrefslogtreecommitdiffstats
path: root/light/txpool.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-12-19 18:23:46 +0800
committerGitHub <noreply@github.com>2016-12-19 18:23:46 +0800
commit7b623aab9dcb855a04737f2eb3c5004f8a53346a (patch)
tree6524a0fffdec287dddbab84e4dcf3a1a298c4e85 /light/txpool.go
parente871ae12709c77c304a9633c0fd498972cf00603 (diff)
parentc44830ebf316bf22104d01aa114d2b6d765d7a76 (diff)
downloaddexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar.gz
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar.bz2
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar.lz
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar.xz
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.tar.zst
dexon-7b623aab9dcb855a04737f2eb3c5004f8a53346a.zip
Merge pull request #3454 from karalabe/allow-zeroprice-tx
core: allow zero priced transactions from inexistent accounts too
Diffstat (limited to 'light/txpool.go')
-rw-r--r--light/txpool.go13
1 files changed, 1 insertions, 12 deletions
diff --git a/light/txpool.go b/light/txpool.go
index 4a06d317d..d0781593b 100644
--- a/light/txpool.go
+++ b/light/txpool.go
@@ -346,19 +346,8 @@ func (pool *TxPool) validateTx(ctx context.Context, tx *types.Transaction) error
if from, err = types.Sender(pool.signer, tx); err != nil {
return core.ErrInvalidSender
}
-
- // Make sure the account exist. Non existent accounts
- // haven't got funds and well therefor never pass.
- currentState := pool.currentState()
- if h, err := currentState.HasAccount(ctx, from); err == nil {
- if !h {
- return core.ErrNonExistentAccount
- }
- } else {
- return err
- }
-
// Last but not least check for nonce errors
+ currentState := pool.currentState()
if n, err := currentState.GetNonce(ctx, from); err == nil {
if n > tx.Nonce() {
return core.ErrNonce