|
| 1 | +// Copyright 2014 The go-ethereum Authors |
| 2 | +// This file is part of the go-ethereum library. |
| 3 | +// |
| 4 | +// The go-ethereum library is free software: you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU Lesser General Public License as published by |
| 6 | +// the Free Software Foundation, either version 3 of the License, or |
| 7 | +// (at your option) any later version. |
| 8 | +// |
| 9 | +// The go-ethereum library is distributed in the hope that it will be useful, |
| 10 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +// GNU Lesser General Public License for more details. |
| 13 | +// |
| 14 | +// You should have received a copy of the GNU Lesser General Public License |
| 15 | +// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +package txpool |
| 18 | + |
| 19 | +import "errors" |
| 20 | + |
| 21 | +var ( |
| 22 | + // ErrAlreadyKnown is returned if the transactions is already contained |
| 23 | + // within the pool. |
| 24 | + ErrAlreadyKnown = errors.New("already known") |
| 25 | + |
| 26 | + // ErrInvalidSender is returned if the transaction contains an invalid signature. |
| 27 | + ErrInvalidSender = errors.New("invalid sender") |
| 28 | + |
| 29 | + // ErrUnderpriced is returned if a transaction's gas price is below the minimum |
| 30 | + // configured for the transaction pool. |
| 31 | + ErrUnderpriced = errors.New("transaction underpriced") |
| 32 | + |
| 33 | + // ErrTxPoolOverflow is returned if the transaction pool is full and can't accept |
| 34 | + // another remote transaction. |
| 35 | + ErrTxPoolOverflow = errors.New("txpool is full") |
| 36 | + |
| 37 | + // ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced |
| 38 | + // with a different one without the required price bump. |
| 39 | + ErrReplaceUnderpriced = errors.New("replacement transaction underpriced") |
| 40 | + |
| 41 | + // ErrGasLimit is returned if a transaction's requested gas limit exceeds the |
| 42 | + // maximum allowance of the current block. |
| 43 | + ErrGasLimit = errors.New("exceeds block gas limit") |
| 44 | + |
| 45 | + // ErrNegativeValue is a sanity error to ensure no one is able to specify a |
| 46 | + // transaction with a negative value. |
| 47 | + ErrNegativeValue = errors.New("negative value") |
| 48 | + |
| 49 | + // ErrOversizedData is returned if the input data of a transaction is greater |
| 50 | + // than some meaningful limit a user might use. This is not a consensus error |
| 51 | + // making the transaction invalid, rather a DOS protection. |
| 52 | + ErrOversizedData = errors.New("oversized data") |
| 53 | + |
| 54 | + // ErrFutureReplacePending is returned if a future transaction replaces a pending |
| 55 | + // transaction. Future transactions should only be able to replace other future transactions. |
| 56 | + ErrFutureReplacePending = errors.New("future transaction tries to replace pending") |
| 57 | + |
| 58 | + ErrZeroGasPrice = errors.New("zero gas price") |
| 59 | + |
| 60 | + ErrUnderMinGasPrice = errors.New("under min gas price") |
| 61 | + |
| 62 | + ErrDuplicateSpecialTransaction = errors.New("duplicate a special transaction") |
| 63 | + |
| 64 | + ErrMinDeploySMC = errors.New("smart contract creation cost is under allowance") |
| 65 | +) |
0 commit comments