diff options
Diffstat (limited to 'light/txpool.go')
-rw-r--r-- | light/txpool.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/light/txpool.go b/light/txpool.go index 309bc3a32..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 @@ -500,7 +489,7 @@ func (tp *TxPool) GetTransaction(hash common.Hash) *types.Transaction { // GetTransactions returns all currently processable transactions. // The returned slice may be modified by the caller. -func (self *TxPool) GetTransactions() (txs types.Transactions) { +func (self *TxPool) GetTransactions() (txs types.Transactions, err error) { self.mu.RLock() defer self.mu.RUnlock() @@ -510,7 +499,7 @@ func (self *TxPool) GetTransactions() (txs types.Transactions) { txs[i] = tx i++ } - return txs + return txs, nil } // Content retrieves the data content of the transaction pool, returning all the |