From dc58258adf1fb1e05002c3057045f113aa214cb7 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 6 Aug 2015 09:51:36 +0200 Subject: 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. --- src/main.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.h') 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 -- cgit v1.2.3