Documentation
¶
Index ¶
- Constants
- Variables
- func IsInsufficientFee(err error) bool
- func IsInsufficientMinGasPrice(err error) booldeprecated
- func IsNonceMismatch(err error) bool
- func IsNonceMismatchCode(code uint32) bool
- func ParseExpectedSequence(str string) (uint64, error)
- func ParseInsufficientMinGasPrice(err error, gasPrice float64, gasLimit uint64) (float64, error)
- func ParseNonceMismatch(err error) (uint64, error)
Constants ¶
const AppErrorsCodespace = "app"
Variables ¶
var (
ErrTxExceedsMaxSize = errors.Register(AppErrorsCodespace, 11142, "exceeds max tx size limit")
)
general application errors
Functions ¶
func IsInsufficientFee ¶ added in v3.8.1
IsInsufficientFee checks if the error is due to the gas price being too low.
func IsInsufficientMinGasPrice
deprecated
func IsNonceMismatch ¶
IsNonceMismatch checks if the error is due to a sequence mismatch.
func IsNonceMismatchCode ¶
IsNonceMismatch checks if the error code matches the sequence mismatch.
func ParseExpectedSequence ¶
ParseExpectedSequence extracts the expected sequence number from the ErrWrongSequence error.
func ParseInsufficientMinGasPrice ¶
ParseInsufficientMinGasPrice checks if the error is due to the gas price being too low. Given the previous gas price and gas limit, it returns the new minimum gas price that the node should accept. If the error is not due to the gas price being too low, it returns 0, nil
func ParseNonceMismatch ¶
ParseNonceMismatch extracts the expected sequence number from the ErrWrongSequence error.
Types ¶
This section is empty.