Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

researcher: Change beacon deferment fix to reference nActiveBeforeSB #2092

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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