Skip to content

Commit 28ddf32

Browse files
add NO_QDUEL toggle
1 parent 9ce65cb commit 28ddf32

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/contract_core/contract_def.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@
215215
#define CONTRACT_STATE2_TYPE QRWA2
216216
#include "contracts/qRWA.h"
217217

218+
#ifndef NO_QDUEL
219+
218220
#undef CONTRACT_INDEX
219221
#undef CONTRACT_STATE_TYPE
220222
#undef CONTRACT_STATE2_TYPE
@@ -225,6 +227,8 @@
225227
#define CONTRACT_STATE2_TYPE QDUEL2
226228
#include "contracts/QDuel.h"
227229

230+
#endif
231+
228232
// new contracts should be added above this line
229233

230234
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
@@ -333,7 +337,9 @@ constexpr struct ContractDescription
333337
{"QIP", 189, 10000, sizeof(QIP)}, // proposal in epoch 187, IPO in 188, construction and first use in 189
334338
{"QRAFFLE", 192, 10000, sizeof(QRAFFLE)}, // proposal in epoch 190, IPO in 191, construction and first use in 192
335339
{"QRWA", 197, 10000, sizeof(QRWA)}, // proposal in epoch 195, IPO in 196, construction and first use in 197
340+
#ifndef NO_QDUEL
336341
{"QDUEL", 199, 10000, sizeof(QDUEL)}, // proposal in epoch 197, IPO in 198, construction and first use in 199
342+
#endif
337343
// new contracts should be added above this line
338344
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
339345
{"TESTEXA", 138, 10000, sizeof(TESTEXA)},
@@ -450,7 +456,9 @@ static void initializeContracts()
450456
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QIP);
451457
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QRAFFLE);
452458
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QRWA);
459+
#ifndef NO_QDUEL
453460
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QDUEL);
461+
#endif
454462
// new contracts should be added above this line
455463
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
456464
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(TESTEXA);

‎src/qubic.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#define SINGLE_COMPILE_UNIT
22

33
// #define OLD_SWATCH
4+
// #define NO_QDUEL
45

56
// contract_def.h needs to be included first to make sure that contracts have minimal access
67
#include "contract_core/contract_def.h"

0 commit comments

Comments
 (0)