Disable Ticket transactions and tests

This commit is contained in:
Nik Bougalis
2015-01-05 13:43:56 -08:00
committed by Vinnie Falco
parent df54b47cd0
commit 0ccdea3cd8
6 changed files with 19 additions and 2 deletions

View File

@@ -204,4 +204,11 @@
#define RIPPLE_HOOK_VALIDATORS 0 #define RIPPLE_HOOK_VALIDATORS 0
#endif #endif
/** Config: RIPPLE_ENABLE_TICKETS
Enables processing of ticket transactions
*/
#ifndef RIPPLE_ENABLE_TICKETS
#define RIPPLE_ENABLE_TICKETS 0
#endif
#endif #endif

View File

@@ -90,7 +90,11 @@ transact_CancelTicket (
TransactionEngineParams params, TransactionEngineParams params,
TransactionEngine* engine) TransactionEngine* engine)
{ {
#if RIPPLE_ENABLE_TICKETS
return CancelTicket (txn, params, engine).apply (); return CancelTicket (txn, params, engine).apply ();
#else
return temDISABLED;
#endif
} }

View File

@@ -132,7 +132,11 @@ transact_CreateTicket (
TransactionEngineParams params, TransactionEngineParams params,
TransactionEngine* engine) TransactionEngine* engine)
{ {
#if RIPPLE_ENABLE_TICKETS
return CreateTicket (txn, params, engine).apply (); return CreateTicket (txn, params, engine).apply ();
#else
return temDISABLED;
#endif
} }
} }

View File

@@ -81,6 +81,7 @@ enum TER // aka TransactionEngineResult
temREDUNDANT, temREDUNDANT,
temREDUNDANT_SEND_MAX, temREDUNDANT_SEND_MAX,
temRIPPLE_EMPTY, temRIPPLE_EMPTY,
temDISABLED,
// An intermediate result used internally, should never be returned. // An intermediate result used internally, should never be returned.
temUNCERTAIN, temUNCERTAIN,

View File

@@ -117,7 +117,8 @@ bool transResultInfo (TER code, std::string& token, std::string& text)
{ temREDUNDANT_SEND_MAX, "temREDUNDANT_SEND_MAX", "Send max is redundant." }, { temREDUNDANT_SEND_MAX, "temREDUNDANT_SEND_MAX", "Send max is redundant." },
{ temRIPPLE_EMPTY, "temRIPPLE_EMPTY", "PathSet with no paths." }, { temRIPPLE_EMPTY, "temRIPPLE_EMPTY", "PathSet with no paths." },
{ temUNCERTAIN, "temUNCERTAIN", "In process of determining result. Never returned." }, { temUNCERTAIN, "temUNCERTAIN", "In process of determining result. Never returned." },
{ temUNKNOWN, "temUNKNOWN", "The transactions requires logic not implemented yet." }, { temUNKNOWN, "temUNKNOWN", "The transaction requires logic that is not implemented yet." },
{ temDISABLED, "temDISABLED", "The transaction requires logic that is currently disabled." },
{ terRETRY, "terRETRY", "Retry transaction." }, { terRETRY, "terRETRY", "Retry transaction." },
{ terFUNDS_SPENT, "terFUNDS_SPENT", "Can't set password, password set funds already spent." }, { terFUNDS_SPENT, "terFUNDS_SPENT", "Can't set password, password set funds already spent." },

View File

@@ -33,7 +33,7 @@ var submit_transaction_factory = function(remote) {
/* ---------------------------------- TESTS --------------------------------- */ /* ---------------------------------- TESTS --------------------------------- */
suite("Ticket tests", function() { suite.skip("Ticket tests", function() {
var $ = { }; var $ = { };
var submit_tx; var submit_tx;