diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-12-16 19:19:02 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-12-16 19:30:39 +0800 |
commit | c44830ebf316bf22104d01aa114d2b6d765d7a76 (patch) | |
tree | 0d8f7fdc157acc378e94555166dbe16fff9a5bb1 /light | |
parent | 38827dd9ca87c1a8ffab32027400abb6e88f073b (diff) | |
download | dexon-c44830ebf316bf22104d01aa114d2b6d765d7a76.tar.gz dexon-c44830ebf316bf22104d01aa114d2b6d765d7a76.tar.zst dexon-c44830ebf316bf22104d01aa114d2b6d765d7a76.zip |
core, light: allow zero cost txs from inexistent accounts too
Diffstat (limited to 'light')
-rw-r--r-- | light/txpool.go | 13 |
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 |