From d1f9a4ba4e439771dc809b5434a26c5cbb067b7d Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Fri, 2 Apr 2021 17:41:47 -0400 Subject: [PATCH] Change beacon deferment fix to reference nActiveBeforeSB --- src/gridcoin/researcher.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gridcoin/researcher.cpp b/src/gridcoin/researcher.cpp index ab441ed3ae..68cb450d05 100644 --- a/src/gridcoin/researcher.cpp +++ b/src/gridcoin/researcher.cpp @@ -26,6 +26,8 @@ #include #include +extern unsigned int nActiveBeforeSB; + using namespace GRC; extern CCriticalSection cs_main; @@ -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) {