34 #define ETH_ADDRESS_DEBUG 0 45 if (!!dynamic_cast<RLPException const*>(&_e))
46 return TransactionException::BadRLP;
47 if (!!dynamic_cast<OutOfGasIntrinsic const*>(&_e))
48 return TransactionException::OutOfGasIntrinsic;
49 if (!!dynamic_cast<InvalidSignature const*>(&_e))
50 return TransactionException::InvalidSignature;
52 if (!!dynamic_cast<OutOfGasBase const*>(&_e))
53 return TransactionException::OutOfGasBase;
54 if (!!dynamic_cast<InvalidNonce const*>(&_e))
55 return TransactionException::InvalidNonce;
56 if (!!dynamic_cast<NotEnoughCash const*>(&_e))
57 return TransactionException::NotEnoughCash;
58 if (!!dynamic_cast<BlockGasLimitReached const*>(&_e))
59 return TransactionException::BlockGasLimitReached;
61 if (!!dynamic_cast<BadInstruction const*>(&_e))
62 return TransactionException::BadInstruction;
63 if (!!dynamic_cast<BadJumpDestination const*>(&_e))
64 return TransactionException::BadJumpDestination;
65 if (!!dynamic_cast<OutOfGas const*>(&_e))
66 return TransactionException::OutOfGas;
67 if (!!dynamic_cast<OutOfStack const*>(&_e))
68 return TransactionException::OutOfStack;
69 if (!!dynamic_cast<StackUnderflow const*>(&_e))
70 return TransactionException::StackUnderflow;
71 if (!!dynamic_cast<CreateWithValue const*>(&_e))
72 return TransactionException::CreateWithValue;
73 return TransactionException::Unknown;
80 case TransactionException::None: _out <<
"None";
break;
81 case TransactionException::BadRLP: _out <<
"BadRLP";
break;
82 case TransactionException::InvalidFormat: _out <<
"InvalidFormat";
break;
83 case TransactionException::OutOfGasIntrinsic: _out <<
"OutOfGasIntrinsic";
break;
84 case TransactionException::InvalidSignature: _out <<
"InvalidSignature";
break;
85 case TransactionException::InvalidNonce: _out <<
"InvalidNonce";
break;
86 case TransactionException::NotEnoughCash: _out <<
"NotEnoughCash";
break;
87 case TransactionException::OutOfGasBase: _out <<
"OutOfGasBase";
break;
88 case TransactionException::BlockGasLimitReached: _out <<
"BlockGasLimitReached";
break;
89 case TransactionException::BadInstruction: _out <<
"BadInstruction";
break;
90 case TransactionException::BadJumpDestination: _out <<
"BadJumpDestination";
break;
91 case TransactionException::OutOfGas: _out <<
"OutOfGas";
break;
92 case TransactionException::OutOfStack: _out <<
"OutOfStack";
break;
93 case TransactionException::StackUnderflow: _out <<
"StackUnderflow";
break;
94 case TransactionException::CreateWithValue: _out <<
"CreateWithValue";
break;
95 case TransactionException::NoInformation: _out <<
"NoInformation";
break;
96 default: _out <<
"Unknown";
break;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::string toHex(T const &_data, int _w=2, HexPrefix _prefix=HexPrefix::DontAdd)
std::ostream & operator<<(std::ostream &_out, BlockHeader const &_bi)
std::hash for asio::adress
Description of the result of executing a transaction.
Base class for all exceptions.
Encodes a transaction, ready to be exported to or freshly imported from RLP.
TransactionException toTransactionException(Exception const &_e)