github.com/aergoio/aergo@v1.3.1/types/errors.go (about)

     1  package types
     2  
     3  import "errors"
     4  
     5  var (
     6  	//ErrTxNotFound is returned by MemPool Service if transaction does not exists
     7  	ErrTxNotFound = errors.New("tx not found in mempool")
     8  
     9  	//ErrTxHasInvalidHash is returned by MemPool Service if transaction does have invalid hash
    10  	ErrTxHasInvalidHash = errors.New("tx has invalid hash")
    11  
    12  	//ErrTxAlreadyInMempool is returned by MemPool Service if exact same transaction is already exists
    13  	ErrTxAlreadyInMempool = errors.New("tx is already in mempool")
    14  
    15  	//ErrSameNonceInMempool is returned by MemPool Service if transaction which has same nonce is already exists
    16  	ErrSameNonceAlreadyInMempool = errors.New("tx with same nonce is already in mempool")
    17  
    18  	//ErrTxFormatInvalid is returned by MemPool Service if transaction does not exists ErrTxFormatInvalid = errors.New("tx invalid format")
    19  	ErrTxFormatInvalid = errors.New("tx invalid format")
    20  
    21  	//ErrInsufficientBalance is returned by MemPool Service if account has not enough balance
    22  	ErrInsufficientBalance = errors.New("not enough balance")
    23  
    24  	//ErrTxNonceTooLow is returned by MemPool Service if transaction's nonce is already existed in block
    25  	ErrTxNonceTooLow = errors.New("nonce is too low")
    26  
    27  	//ErrTxNonceToohigh is for internal use only
    28  	ErrTxNonceToohigh = errors.New("nonce is too high")
    29  
    30  	ErrTxInvalidType = errors.New("tx invalid type")
    31  
    32  	ErrTxInvalidAccount = errors.New("tx invalid account")
    33  
    34  	ErrTxNotAllowedAccount = errors.New("tx not allowed account")
    35  
    36  	ErrTxInvalidChainIdHash = errors.New("tx invalid chain id hash")
    37  
    38  	//ErrInvalidRecipient
    39  	ErrTxInvalidRecipient = errors.New("tx invalid recipient")
    40  
    41  	ErrTxInvalidAmount = errors.New("tx invalid amount")
    42  
    43  	ErrTxInvalidPrice = errors.New("tx invalid price")
    44  
    45  	ErrTxInvalidPayload = errors.New("tx invalid payload")
    46  
    47  	ErrTxInvalidSize = errors.New("size of tx exceeds max length")
    48  
    49  	ErrTxOnlySupportedInPriv = errors.New("tx only supported in private")
    50  
    51  	ErrSignNotMatch = errors.New("signature not matched")
    52  
    53  	ErrCouldNotRecoverPubKey = errors.New("could not recover pubkey from sign")
    54  
    55  	ErrShouldUnlockAccount = errors.New("should unlock account first")
    56  
    57  	ErrWrongAddressOrPassWord = errors.New("address or password is incorrect")
    58  
    59  	//ErrStakeBeforeVote
    60  	ErrMustStakeBeforeVote = errors.New("must stake before vote")
    61  
    62  	//ErrLessTimeHasPassed
    63  	ErrLessTimeHasPassed = errors.New("less time has passed")
    64  
    65  	//ErrTooSmallAmount
    66  	ErrTooSmallAmount = errors.New("too small amount to influence")
    67  
    68  	ErrNameNotFound = errors.New("could not find name")
    69  
    70  	//ErrMustStakeBeforeUnstake
    71  	ErrMustStakeBeforeUnstake = errors.New("must stake before unstake")
    72  
    73  	//ErrTooSmallAmount
    74  	ErrExceedAmount = errors.New("request amount exceeds")
    75  
    76  	ErrCreatorNotMatch = errors.New("creator not matched")
    77  )