From a7df0ea35e65c96a2cb910389c92902064fa05cc 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gridcoin/researcher.cpp b/src/gridcoin/researcher.cpp index ab441ed3ae..045ba1a51d 100644 --- a/src/gridcoin/researcher.cpp +++ b/src/gridcoin/researcher.cpp @@ -30,6 +30,7 @@ using namespace GRC; extern CCriticalSection cs_main; extern std::string msMiningErrors; +extern unsigned int nActiveBeforeSB; namespace { //! @@ -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) {