Skip to content

Commit

Permalink
Return true from IsBlockValueValid when masternode data is not synced
Browse files Browse the repository at this point in the history
  - This restores behavior very close to that in 12.0
  - Needed to prevent the forking problem currently being seen on
    testnet between online and offline nodes
  - This is expected to be a temporary fix while we develop a
    long-term solution for this problem
  • Loading branch information
tgflynn committed Aug 18, 2016
1 parent 1ecabea commit 13316a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/masternode-payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ bool IsBlockValueValid(const CBlock& block, CAmount nExpectedValue){

bool valueok = (block.vtx[0].GetValueOut() <= nExpectedValue);

// IF WE'RE NOT SYNCED, WE MAY NOT HAVE SUPERBLOCK DATA, SO RETURN THE USUAL CHECK
// IF WE'RE NOT SYNCED, WE MAY NOT HAVE SUPERBLOCK DATA, SO RETURN TRUE FOR NOW

if(!masternodeSync.IsSynced()) {
// IF NOT SYNCED, WE WILL SIMPLY FIND THE LONGEST CHAIN
return valueok;
return true;
}

// IF THIS IS A VALID SUPERBLOCK RETURN TRUE SINCE SUPERBLOCKS ARE CHECKED
Expand Down

0 comments on commit 13316a4

Please sign in to comment.