diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-06 09:51:36 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-11 17:29:33 +0200 |
commit | dc58258adf1fb1e05002c3057045f113aa214cb7 (patch) | |
tree | 4c081f14d824328c6f80709559ce279839447f7a /src/main.h | |
parent | fbf44e6f3e55d25aa40ca466be3dbfd55de6170a (diff) |
Introduce REJECT_INTERNAL codes for local AcceptToMempool errors
Add status codes specific to AcceptToMempool procession of transactions.
These can never happen due to block validation, and must never be sent
over the P2P network. Add assertions where appropriate.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h index eec7e6fa59..5c54b11d46 100644 --- a/src/main.h +++ b/src/main.h @@ -455,7 +455,16 @@ extern CBlockTreeDB *pblocktree; */ int GetSpendHeight(const CCoinsViewCache& inputs); -/** local "reject" message codes for RPC which can not be triggered by p2p trasactions */ +/** Reject codes greater or equal to this can be returned by AcceptToMemPool + * for transactions, to signal internal conditions. They cannot and should not + * be sent over the P2P network. + */ +static const unsigned int REJECT_INTERNAL = 0x100; +/** Too high fee. Can not be triggered by P2P transactions */ static const unsigned int REJECT_HIGHFEE = 0x100; +/** Transaction is already known (either in mempool or blockchain) */ +static const unsigned int REJECT_ALREADY_KNOWN = 0x101; +/** Transaction conflicts with a transaction already known */ +static const unsigned int REJECT_CONFLICT = 0x102; #endif // BITCOIN_MAIN_H |