Skip to content

Commit

Permalink
1.2.0.1-Mandatory Upgrade
Browse files Browse the repository at this point in the history
- Make masternode payment configurable by spork (to allow us to
bootstrap biblepays POW system to be fully in agreement first)
  • Loading branch information
biblepay committed Mar 15, 2019
1 parent 1632957 commit c18f22c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 9)
define(_CLIENT_VERSION_BUILD, 9)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([biblepay Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/biblepaypay/biblepay/issues],[biblepaycore])
Expand Down
6 changes: 3 additions & 3 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const std::string CLIENT_NAME("Biblepay Core");


const int BIBLEPAY_VERSION_MAJOR = 1;
const int BIBLEPAY_VERSION_MINOR = 1;
const int BIBLEPAY_VERSION_REVISION = 9;
const int BIBLEPAY_VERSION_BUILD = 9;
const int BIBLEPAY_VERSION_MINOR = 2;
const int BIBLEPAY_VERSION_REVISION = 0;
const int BIBLEPAY_VERSION_BUILD = 1;


const int BIBLE_VERSION = 1000000 * BIBLEPAY_VERSION_MAJOR
Expand Down
11 changes: 5 additions & 6 deletions src/masternode-payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount bloc
}
*/
bool bSpork8 = nBlockHeight > consensusParams.nMasternodePaymentsStartBlock + (7 * BLOCKS_PER_DAY);
if(fMasternodesEnabled && bSpork8)
bool bSpork8 = sporkManager.IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT);

if(bSpork8)
{
LogPrintf("IsBlockPayeeValid -- ERROR: Invalid masternode payment detected at height %d: %s", nBlockHeight, txNew.ToString());
return false;
Expand Down Expand Up @@ -258,15 +259,13 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount bloc
}

// IF THIS ISN'T A SUPERBLOCK OR SUPERBLOCK IS INVALID, IT SHOULD PAY A MASTERNODE DIRECTLY
int nSpork8Height = fProd ? SPORK8_HEIGHT : SPORK8_HEIGHT_TESTNET;
bool bSpork8 = nBlockHeight > nSpork8Height;


if(mnpayments.IsTransactionValid(txNew, nBlockHeight))
{
LogPrint("mnpayments", "IsBlockPayeeValid -- Valid masternode payment at height %d: %s", nBlockHeight, txNew.ToString());
return true;
}
else if(bSpork8 && fMasternodesEnabled)
else if (sporkManager.IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT))
{
LogPrintf("IsBlockPayeeValid -- ERROR: Invalid masternode payment detected at height %d: %s", nBlockHeight, txNew.ToString());
return false;
Expand Down

0 comments on commit c18f22c

Please sign in to comment.