Skip to content

Commit

Permalink
Hot fix 2 (#210)
Browse files Browse the repository at this point in the history
* hotfix: not accept votes for tick 116 and 117

* hotfix: forcing tick 116 and 117 to be empty

* hotfix: forcing to end epoch at 16907116

* hotfix: reset the flag

* Update params for 1.224.4

---------

Co-authored-by: krypdkat <[email protected]>
  • Loading branch information
philippwerner and krypdkat authored Oct 30, 2024
1 parent 34ac116 commit 234f9a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/public_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#define VERSION_A 1
#define VERSION_B 224
#define VERSION_C 3
#define VERSION_C 4

// Epoch and initial tick for node startup
#define EPOCH 132
Expand Down
19 changes: 15 additions & 4 deletions src/qubic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4031,8 +4031,16 @@ static void tickProcessor(void*)
}
::tickNumberOfComputors = tickNumberOfComputors;
::tickTotalNumberOfComputors = tickTotalNumberOfComputors;

if (tickNumberOfComputors >= QUORUM)

// hotfix:
bool forcingToEndEpoch = false;
if (system.tick == 16908300)
{
forcingToEndEpoch = true;
targetNextTickDataDigestIsKnown = true;
targetNextTickDataDigest = m256i::zero();
}
if (tickNumberOfComputors >= QUORUM || forcingToEndEpoch)
{
if (!targetNextTickDataDigestIsKnown)
{
Expand Down Expand Up @@ -4104,12 +4112,15 @@ static void tickProcessor(void*)
if (tickDataSuits)
{
const int dayIndex = ::dayIndex(etalonTick.year, etalonTick.month, etalonTick.day);
if ((dayIndex == 738570 + system.epoch * 7 && etalonTick.hour >= 12)
|| dayIndex > 738570 + system.epoch * 7)
if (
((dayIndex == 738570 + system.epoch * 7 && etalonTick.hour >= 12)
|| dayIndex > 738570 + system.epoch * 7) || forcingToEndEpoch
)
{
// start seamless epoch transition
epochTransitionState = 1;
forceSwitchEpoch = false;
forcingToEndEpoch = false;
}
else
{
Expand Down

0 comments on commit 234f9a3

Please sign in to comment.