Skip to content

Commit

Permalink
Change beacon deferment fix to reference nActiveBeforeSB
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescowens committed Apr 2, 2021
1 parent 60196ce commit d1f9a4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gridcoin/researcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <openssl/md5.h>
#include <set>

extern unsigned int nActiveBeforeSB;

using namespace GRC;

extern CCriticalSection cs_main;
Expand Down Expand Up @@ -1124,9 +1126,10 @@ void Researcher::RunRenewBeaconJob()
// beacons before a superblock is due. This avoids overwriting beacon
// timestamps in the beacon registry in a way that causes the renewed
// beacon to appear ahead of the scraper beacon consensus window. The
// window begins 4 hours before the next superblock by convention.
// window begins nActiveBeforeSB seconds before the next superblock.
// This is four hours by default unless overridden by protocol entry.
//
if (!Quorum::SuperblockNeeded(pindexBest->nTime + (60 * 60 * 4))) {
if (!Quorum::SuperblockNeeded(pindexBest->nTime + nActiveBeforeSB)) {
TRY_LOCK(pwalletMain->cs_wallet, locked_wallet);

if (!locked_wallet) {
Expand Down

0 comments on commit d1f9a4b

Please sign in to comment.