Skip to content

Commit

Permalink
Merge branch 'PNY-develop' of https://github.com/decenomy/DSW
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-at-decenomy committed Jan 16, 2023
2 parents 26cb4d9 + 817a165 commit b1947f9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class CMainParams : public CChainParams
consensus.nFutureTimeDriftPoS = 180;
consensus.nMaxMoneyOut = 9999999999 * COIN;
consensus.nPoolMaxTransactions = 3;
consensus.nStakeMinAge = 60 * 60; // 1h
consensus.nStakeMinAge = 30 * 60; // 30 min.
consensus.nStakeMinDepth = 100;
consensus.nStakeMinDepthV2 = 600;
consensus.nTargetTimespan = 40 * 60;
Expand Down
7 changes: 6 additions & 1 deletion src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,12 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)
sigTime, vin.prevout.hash.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
return false;
}
if (GetMasternodeNodeCollateral(nConfHeight) != GetMasternodeNodeCollateral(chainActive.Height())) {

auto week_in_blocks = WEEK_IN_SECONDS / Params().GetConsensus().nTargetSpacing;

if (GetMasternodeNodeCollateral(nConfHeight) != GetMasternodeNodeCollateral(chainActive.Height()) &&
GetMasternodeNodeCollateral(nConfHeight + week_in_blocks) != GetMasternodeNodeCollateral(chainActive.Height()))
{
LogPrint(BCLog::MASTERNODE,"mnb - Wrong collateral transaction value of %d for Masternode %s (%i conf block is at %d)\n",
GetMasternodeNodeCollateral(nConfHeight) / COIN, vin.prevout.hash.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/masternodewizarddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ bool MasterNodeWizardDialog::createMN()
int indexOut = -1;
for (int i=0; i < (int)walletTx->vout.size(); i++) {
CTxOut& out = walletTx->vout[i];
if (out.nValue == CMasternode::CMasternode::GetNextWeekMasternodeCollateral()) {
if (out.nValue == CMasternode::GetNextWeekMasternodeCollateral()) {
indexOut = i;
break;
}
Expand Down

0 comments on commit b1947f9

Please sign in to comment.