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 a7df0ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gridcoin/researcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using namespace GRC;

extern CCriticalSection cs_main;
extern std::string msMiningErrors;
extern unsigned int nActiveBeforeSB;

namespace {
//!
Expand Down Expand Up @@ -1124,9 +1125,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 a7df0ea

Please sign in to comment.