Kagome
Polkadot Runtime Engine in C++17
transaction_validity.cpp
Go to the documentation of this file.
1 
7 
10  switch (e) {
11  case E::Call:
12  return "The call of the transaction is not expected";
13  case E::Payment:
14  return "General error to do with the inability to pay some fees (e.g. "
15  "account balance too low)";
16  case E::Future:
17  return "General error to do with the transaction not yet being valid "
18  "(e.g. nonce too high)";
19  case E::Stale:
20  return "General error to do with the transaction being outdated (e.g. "
21  "nonce too low)";
22  case E::BadProof:
23  return "General error to do with the transaction's proofs (e.g. "
24  "signature)";
25  case E::AncientBirthBlock:
26  return "The transaction birth block is ancient";
27  case E::ExhaustsResources:
28  return "The transaction would exhaust the resources of current block. "
29  "The transaction might be valid, but there are not enough "
30  "resources left in the current block";
31  case E::Custom:
32  return "Custom invalid error";
33  case E::BadMandatory:
34  return "A call was labelled as mandatory, but resulted in an Error.";
35  case E::MandatoryDispatch:
36  return "Transaction dispatch is mandatory; transactions may not have "
37  "mandatory dispatches.";
38  }
39  return "Unknown InvalidTransaction error";
40 }
41 
44  switch (e) {
45  case E::CannotLookup:
46  return "Could not lookup some information that is required to validate "
47  "the transaction";
48  case E::NoUnsignedValidator:
49  return "No validator found for the given unsigned transaction";
50  case E::Custom:
51  return "Custom unknown error";
52  }
53  return "Unknown UnknownTransaction error";
54 }
UnknownTransaction
An unknown transaction validity.
OUTCOME_CPP_DEFINE_CATEGORY(kagome::primitives, InvalidTransaction, e)
InvalidTransaction
Transaction is invalid. Details are described by the error code.