Skip to content

Commit a4822b2

Browse files
Merge pull request #780 from qubic/develop (Release v1.281.0)
Release v1.281.0
2 parents 6064b81 + b90b444 commit a4822b2

File tree

12 files changed

+3930
-7
lines changed

12 files changed

+3930
-7
lines changed

src/Qubic.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<ClInclude Include="contracts\QIP.h" />
4949
<ClInclude Include="contracts\QReservePool.h" />
5050
<ClInclude Include="contracts\QThirtyFour.h" />
51+
<ClInclude Include="contracts\Pulse.h" />
5152
<ClInclude Include="contracts\TestExampleA.h" />
5253
<ClInclude Include="contracts\TestExampleB.h" />
5354
<ClInclude Include="contracts\TestExampleC.h" />

src/Qubic.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@
305305
<ClInclude Include="contracts\QDuel.h">
306306
<Filter>contracts</Filter>
307307
</ClInclude>
308+
<ClInclude Include="contracts\Pulse.h">
309+
<Filter>contracts</Filter>
310+
</ClInclude>
308311
<ClInclude Include="contract_core\pre_qpi_def.h">
309312
<Filter>contract_core</Filter>
310313
</ClInclude>

src/contract_core/contract_def.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,20 @@
244244
#define CONTRACT_STATE2_TYPE QDUEL2
245245
#include "contracts/QDuel.h"
246246

247+
#ifndef NO_PULSE
248+
249+
#undef CONTRACT_INDEX
250+
#undef CONTRACT_STATE_TYPE
251+
#undef CONTRACT_STATE2_TYPE
252+
253+
#define PULSE_CONTRACT_INDEX 24
254+
#define CONTRACT_INDEX PULSE_CONTRACT_INDEX
255+
#define CONTRACT_STATE_TYPE PULSE
256+
#define CONTRACT_STATE2_TYPE PULSE2
257+
#include "contracts/Pulse.h"
258+
259+
#endif
260+
247261
// new contracts should be added above this line
248262

249263
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
@@ -355,6 +369,9 @@ constexpr struct ContractDescription
355369
{"QRP", 199, 10000, sizeof(IPO)}, // proposal in epoch 197, IPO in 198, construction and first use in 199
356370
{"QTF", 199, 10000, sizeof(QTF)}, // proposal in epoch 197, IPO in 198, construction and first use in 199
357371
{"QDUEL", 199, 10000, sizeof(QDUEL)}, // proposal in epoch 197, IPO in 198, construction and first use in 199
372+
#ifndef NO_PULSE
373+
{"PULSE", 204, 10000, sizeof(PULSE)}, // proposal in epoch 202, IPO in 203, construction and first use in 204
374+
#endif
358375
// new contracts should be added above this line
359376
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
360377
{"TESTEXA", 138, 10000, sizeof(TESTEXA)},
@@ -474,6 +491,9 @@ static void initializeContracts()
474491
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QRP);
475492
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QTF);
476493
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(QDUEL);
494+
#ifndef NO_PULSE
495+
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(PULSE);
496+
#endif
477497
// new contracts should be added above this line
478498
#ifdef INCLUDE_CONTRACT_TEST_EXAMPLES
479499
REGISTER_CONTRACT_FUNCTIONS_AND_PROCEDURES(TESTEXA);

src/contract_core/ipo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ static void finishIPOs()
183183
if (finalPrice > 0)
184184
{
185185
setContractFeeReserve(contractIndex, finalPrice * NUMBER_OF_COMPUTORS);
186+
// IPO finished successfully, mark this contract error as NoContractError
187+
contractError[contractIndex] = NoContractError;
186188
}
187189
else
188190
{

0 commit comments

Comments
 (0)