Skip to content

Commit

Permalink
Version 2.0
Browse files Browse the repository at this point in the history
Changes for more stable block chain.
2min block time
1 day old min age
Old Clients will be disconnted on Friday Sep 15th
  • Loading branch information
Tranz5 committed Sep 10, 2017
1 parent 84adf39 commit e9d6e2e
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 53 deletions.
2 changes: 1 addition & 1 deletion HoboNickels-qt.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = HoboNickels-qt
VERSION = 1.5.5.4
VERSION = 2.0.0.0
QT += core gui network
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES
Expand Down
4 changes: 2 additions & 2 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ namespace Checkpoints
{
// Test signing a sync-checkpoint with genesis block
CSyncCheckpoint checkpoint;
checkpoint.hashCheckpoint = !fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet;
checkpoint.hashCheckpoint = (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet);
CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
sMsg << (CUnsignedSyncCheckpoint)checkpoint;
checkpoint.vchMsg = std::vector<unsigned char>(sMsg.begin(), sMsg.end());
Expand Down Expand Up @@ -375,7 +375,7 @@ namespace Checkpoints
assert(mapBlockIndex.count(hashSyncCheckpoint));
const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint];
return (nBestHeight >= pindexSync->nHeight + nCoinbaseMaturity ||
pindexSync->GetBlockTime() + nStakeMinAge < GetAdjustedTime());
pindexSync->GetBlockTime() + SetStakeMinAge() < GetAdjustedTime());
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 5
#define CLIENT_VERSION_REVISION 5
#define CLIENT_VERSION_BUILD 5
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
12 changes: 6 additions & 6 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ int64_t GetWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd)
// Maximum TimeWeight is 30 days.

if ( nIntervalEnd > VERSION1_5_SWITCH_TIME )
return min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64_t)nStakeMaxAge);
return min(nIntervalEnd - nIntervalBeginning - SetStakeMinAge(), (int64_t)nStakeMaxAge);
else
return min(nIntervalEnd - nIntervalBeginning, (int64_t)nStakeMaxAge) - nStakeMinAge;
return min(nIntervalEnd - nIntervalBeginning, (int64_t)nStakeMaxAge) - SetStakeMinAge();
}

// Get the last stake modifier and its generation time from a given block
Expand Down Expand Up @@ -156,7 +156,7 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeMod

// Sort candidate blocks by timestamp
vector<pair<int64_t, uint256> > vSortedByTimestamp;
vSortedByTimestamp.reserve(64 * nModifierInterval / nStakeTargetSpacing);
vSortedByTimestamp.reserve(64 * nModifierInterval / SetTargetSpacing());
int64_t nSelectionInterval = GetStakeModifierSelectionInterval();
int64_t nSelectionIntervalStart = (pindexPrev->GetBlockTime() / nModifierInterval) * nModifierInterval - nSelectionInterval;
const CBlockIndex* pindex = pindexPrev;
Expand Down Expand Up @@ -234,7 +234,7 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64_t& nStakeModifi
{
if (!pindex->pnext)
{ // reached best block; may happen if node is behind on block chain
if (fPrintProofOfStake || (pindex->GetBlockTime() + nStakeMinAge - nStakeModifierSelectionInterval > GetAdjustedTime()))
if (fPrintProofOfStake || (pindex->GetBlockTime() + SetStakeMinAge() - nStakeModifierSelectionInterval > GetAdjustedTime()))
return error("GetKernelStakeModifier() : reached best block %s at height %d from block %s",
pindex->GetBlockHash().ToString(), pindex->nHeight, hashBlockFrom.ToString());
else
Expand Down Expand Up @@ -287,7 +287,7 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned
return error("CheckStakeKernelHash() : nTime violation");

unsigned int nTimeBlockFrom = blockFrom.GetBlockTime();
if (nTimeBlockFrom + nStakeMinAge > nTimeTx) // Min age requirement
if (nTimeBlockFrom + SetStakeMinAge() > nTimeTx) // Min age requirement
return error("CheckStakeKernelHash() : min age violation");

CBigNum bnTargetPerCoinDay;
Expand Down Expand Up @@ -365,7 +365,7 @@ bool ScanForStakeKernelHash(MetaMap &mapMeta, KernelSearchSettings &settings, Co
static int nMaxStakeSearchInterval = 60;

// only count coins meeting min age requirement
if (nStakeMinAge + block.nTime > settings.nTime - nMaxStakeSearchInterval)
if (SetStakeMinAge() + block.nTime > settings.nTime - nMaxStakeSearchInterval)
continue;

// Transaction offset inside block
Expand Down
123 changes: 96 additions & 27 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20);
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30);


static CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16);
static CBigNum bnProofOfStakeLimitTestNet(~uint256(0) >> 20);

unsigned int nStakeMinAge = 60 * 60 * 24 * 10; // minimum age for coin age - 10 days
unsigned int nStakeMaxAge = 60 * 60 * 24 * 30; // stake age of full weight - 30 days
unsigned int nStakeTargetSpacing = 1 * 30; // 1-minute block spacing

int64_t nChainStartTime = 1371910049;
int nCoinbaseMaturity = 5;
CBlockIndex* pindexGenesisBlock = NULL;
Expand Down Expand Up @@ -84,6 +82,23 @@ int64_t nSplitThreshold = GetProofOfWorkReward();
int64_t nCombineThreshold = GetProofOfWorkReward() * 2;
extern enum Checkpoints::CPMode CheckpointsMode;

unsigned int SetTargetSpacing()
{
unsigned int nStakeTargetSpacingSwitch = (fTestNet ? 1 * 60 : 1 * 30); // block spacing, 1 min tesnet, 30 seconds Main (OLD)
if ( nBestHeight + 1 > (fTestNet ? SPACING_TARGET_SWITCH_TESTNET : SPACING_TARGET_SWITCH))
nStakeTargetSpacingSwitch = 4.20 * 30; // 2 Minute 06 Second block spacing (NEW)

return nStakeTargetSpacingSwitch;
}

unsigned int SetStakeMinAge()
{
unsigned int nStakeMinAgeSwitch = (fTestNet ? 2 * 60 * 60 : 60 * 60 * 24 * 10); // minimum age for coin age - 2hrs TestNet, 10 days Main (OLD)
if (nBestHeight + 1 > (fTestNet ? SPACING_TARGET_SWITCH_TESTNET : SPACING_TARGET_SWITCH))
nStakeMinAgeSwitch = 60 * 60 * 24 * 1; // minimum age for coin age - 1 day (NEW)

return nStakeMinAgeSwitch;
}

//////////////////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -160,10 +175,9 @@ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock, bool fUpdate,
{
LOCK(cs_setpwalletRegistered);
BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) {
if (pwallet->AddToWalletIfInvolvingMe(tx, pblock, fUpdate) ) {
// Preloaded coins cache invalidation
pwallet->SetCoinsDataActual(false);
}
pwallet->AddToWalletIfInvolvingMe(tx, pblock, fUpdate);
// Preloaded coins cache invalidation
pwallet->SetCoinsDataActual(false);
}
}
}
Expand Down Expand Up @@ -838,7 +852,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CTransaction &tx,

// Check against previous transactions
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
if (!tx.ConnectInputs(txdb, mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false, true, SIG_SWITCH_TIME < tx.nTime ? STRICT_FLAGS : SOFT_FLAGS))
if (!tx.ConnectInputs(txdb, mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false, true, VERSION_2_0_SWITCH_TIME < tx.nTime ? STRICT_FLAGS : SOFT_FLAGS))
{
return error("AcceptToMemoryPool : ConnectInputs failed %s", hash.ToString().substr(0,10));
}
Expand Down Expand Up @@ -1094,7 +1108,9 @@ int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, unsigned int
{
int64_t nSubsidy = 0;

if ( nTime > VERSION1_5_SWITCH_TIME )
if ( nTime > (fTestNet ? VERSION_2_0_SWITCH_TIME_TESTNET : VERSION_2_0_SWITCH_TIME) )
nSubsidy = GetProofOfStakeRewardV3(nCoinAge, nBits, nTime, bCoinYearOnly);
else if ( nTime > VERSION1_5_SWITCH_TIME )
nSubsidy = GetProofOfStakeRewardV2(nCoinAge, nBits, nTime, bCoinYearOnly);
else
nSubsidy = GetProofOfStakeRewardV1(nCoinAge, nBits, nTime, bCoinYearOnly);
Expand Down Expand Up @@ -1242,8 +1258,59 @@ int64_t GetProofOfStakeRewardV2(int64_t nCoinAge, unsigned int nBits, unsigned i
return nSubsidy;
}

int64_t GetProofOfStakeRewardV3(int64_t nCoinAge, unsigned int nBits, unsigned int nTime, bool bCoinYearOnly)
{
CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE_FIX2; // Base stake mint rate, 100% year interest
int64_t nRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE_FIX2;
CBigNum bnTarget;
bnTarget.SetCompact(nBits);
CBigNum bnTargetLimit = bnProofOfStakeLimit;
bnTargetLimit.SetCompact(bnTargetLimit.GetCompact());
int64_t nSubsidyLimit = 250 * COIN;

// HoboNickels: reward for coin-year is cut in half every 128x multiply of PoS difficulty
// A reasonably continuous curve is used to avoid shock to market
// (bnRewardCoinYearLimit / nRewardCoinYear) ** 5 == bnProofOfStakeLimit / bnTarget
//
// Human readable form:
//
// nRewardCoinYear = 1 / (posdiff ^ 1/5)

CBigNum bnLowerBound = 20 * CENT; // Lower interest bound is 20% per year
CBigNum bnUpperBound = bnRewardCoinYearLimit;
CBigNum bnMidPart, bnRewardPart;

while (bnLowerBound + CENT <= bnUpperBound)
{
CBigNum bnMidValue = (bnLowerBound + bnUpperBound) / 2;

bnMidPart = bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnMidValue;
bnRewardPart = bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit;

LogPrint("creation", "GetProofOfStakeReward() : lower=%d upper=%d mid=%d\n", bnLowerBound.getuint64(), bnUpperBound.getuint64(), bnMidValue.getuint64());

if (bnMidPart * bnTargetLimit > bnRewardPart * bnTarget)
bnUpperBound = bnMidValue;
else
bnLowerBound = bnMidValue;
}

int64_t nRewardCoinYear = bnUpperBound.getuint64();
nRewardCoinYear = min((nRewardCoinYear / CENT) * CENT, nRewardCoinYearLimit);

if(bCoinYearOnly)
return nRewardCoinYear;

int64_t nSubsidy = (nCoinAge * 33 * nRewardCoinYear) / (365 * 33 + 8);

LogPrint("creation","GetProofOfStakeReward(): create=%s nCoinAge=%d nBits=%d, Amount Truncated %s\n", FormatMoney(nSubsidy), nCoinAge, nBits, nSubsidyLimit < nSubsidy ? FormatMoney(nSubsidy - nSubsidyLimit) : FormatMoney(0));

nSubsidy = min(nSubsidy, nSubsidyLimit);

return nSubsidy;
}

static const int64_t nTargetTimespan = 0.16 * 24 * 60 * 60; // 4-hour
static const int64_t nTargetSpacingWorkMax = 12 * nStakeTargetSpacing; // 2-hour

// maximum nBits value could possible be required nTime after
//
Expand Down Expand Up @@ -1300,6 +1367,7 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
unsigned int GetNextTargetRequiredV1(const CBlockIndex* pindexLast, bool fProofOfStake)
{
CBigNum bnTargetLimit = !fProofOfStake ? bnProofOfWorkLimit : bnProofOfStakeLimit;
int64_t nTargetSpacingWorkMax = 12 * SetTargetSpacing(); // 2-hour

if(fProofOfStake)
{
Expand Down Expand Up @@ -1331,7 +1399,8 @@ unsigned int GetNextTargetRequiredV1(const CBlockIndex* pindexLast, bool fProofO
// ppcoin: retarget with exponential moving toward target spacing
CBigNum bnNew;
bnNew.SetCompact(pindexPrev->nBits);
int64_t nTargetSpacing = fProofOfStake? nStakeTargetSpacing : min(nTargetSpacingWorkMax, (int64_t) nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));
unsigned int nTargetStakeSpacing = SetTargetSpacing();
int64_t nTargetSpacing = fProofOfStake ? nTargetStakeSpacing : min(nTargetSpacingWorkMax, (int64_t) nTargetStakeSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));
int64_t nInterval = nTargetTimespan / nTargetSpacing;
bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing);
bnNew /= ((nInterval + 1) * nTargetSpacing);
Expand All @@ -1345,6 +1414,7 @@ unsigned int GetNextTargetRequiredV1(const CBlockIndex* pindexLast, bool fProofO
unsigned int GetNextTargetRequiredV2(const CBlockIndex* pindexLast, bool fProofOfStake)
{
CBigNum bnTargetLimit = !fProofOfStake ? bnProofOfWorkLimit : bnProofOfStakeLimit;
int64_t nTargetSpacingWorkMax = 12 * SetTargetSpacing(); // 2-hour

if (pindexLast == NULL)
return bnTargetLimit.GetCompact(); // genesis block
Expand All @@ -1356,8 +1426,9 @@ unsigned int GetNextTargetRequiredV2(const CBlockIndex* pindexLast, bool fProofO
if (pindexPrevPrev->pprev == NULL)
return bnTargetLimit.GetCompact(); // second block

unsigned int nTargetStakeSpacing = SetTargetSpacing();
int64_t nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime();
int64_t nTargetSpacing = fProofOfStake? nStakeTargetSpacing : min(nTargetSpacingWorkMax, (int64_t) nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));
int64_t nTargetSpacing = fProofOfStake ? nTargetStakeSpacing : min(nTargetSpacingWorkMax, (int64_t) nTargetStakeSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight));

if (nActualSpacing < 0)
nActualSpacing = nTargetSpacing;
Expand Down Expand Up @@ -1673,8 +1744,9 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, map<uint256, CTx
// Check for conflicts (double-spend)
// This doesn't trigger the DoS code on purpose; if it did, it would make it easier
// for an attacker to attempt to split the network.
if (!txindex.vSpent[prevout.n].IsNull())
return fMiner ? false : error("ConnectInputs() : %s prev tx already used at %s", GetHash().ToString().substr(0,10), txindex.vSpent[prevout.n].ToString());
if (!txindex.vSpent[prevout.n].IsNull()) {
return fMiner ? false : error("ConnectInputs() : %s prev tx already used at %s", GetHash().ToString(), txindex.vSpent[prevout.n].ToString());
}

// Skip ECDSA signature verification when connecting blocks (fBlock=true)
// before the last blockchain checkpoint. This is safe because block merkle hashes are
Expand Down Expand Up @@ -2186,7 +2258,7 @@ bool CTransaction::GetCoinAge(CTxDB& txdb, uint64_t& nCoinAge) const
CBlock block;
if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false))
return false; // unable to read block of previous transaction
if (block.GetBlockTime() + nStakeMinAge > nTime)
if (block.GetBlockTime() + SetStakeMinAge() > nTime)
continue; // only count coins meeting min age requirement

int64_t nValueIn = txPrev.vout[txin.prevout.n].nValue;
Expand Down Expand Up @@ -2495,15 +2567,6 @@ bool CBlock::AcceptBlock()
pnode->PushInventory(CInv(MSG_BLOCK, hash));
}

if (!IsInitialBlockDownload() && (pindexBest->nHeight % 10 ) == 0 )
{
AssertLockHeld(cs_setpwalletRegistered);
BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) {
// Preloaded coins cache invalidation
pwallet->SetCoinsDataActual(false);
}
}

// ppcoin: check pending sync-checkpoint
Checkpoints::AcceptPendingSyncCheckpoint();

Expand Down Expand Up @@ -2891,10 +2954,8 @@ bool LoadBlockIndex(bool fAllowNew)

bnProofOfStakeLimit = bnProofOfStakeLimitTestNet; // 0x00000fff PoS base target is fixed in testnet
bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 0x0000ffff PoW base target is fixed in testnet
nStakeMinAge = 2 * 60 * 60; // test net min age is 2 hours
nModifierInterval = 20 * 60; // test modifier interval is 20 minutes
nCoinbaseMaturity = 10; // test maturity is 10 blocks
nStakeTargetSpacing = 1 * 60; // test block spacing is 3 minutes
}

//
Expand Down Expand Up @@ -3294,6 +3355,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
return false;
}

if (pfrom->nVersion < 70010 && pindexBest->nHeight + 1 > SPACING_TARGET_SWITCH)
{
// disconnect from peers older than this proto version
LogPrintf("partner %s using obsolete version %i; disconnecting\n", pfrom->addr.ToString(), pfrom->nVersion);
pfrom->fDisconnect = true;
return false;
}

if (pfrom->nVersion == 10300)
pfrom->nVersion = 300;
if (!vRecv.empty())
Expand Down Expand Up @@ -3612,7 +3681,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
LogPrint("net", " getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString().substr(0,20));
// ppcoin: tell downloading node about the latest block if it's
// without risk being rejected due to stake connection check
if (hashStop != hashBestChain && pindex->GetBlockTime() + nStakeMinAge > pindexBest->GetBlockTime())
if (hashStop != hashBestChain && pindex->GetBlockTime() + SetStakeMinAge() > pindexBest->GetBlockTime())
pfrom->PushInventory(CInv(MSG_BLOCK, hashBestChain));
break;
}
Expand Down
14 changes: 8 additions & 6 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ static const unsigned int POS_REWARD_SWITCH_TIME = 1378684800; // 9 SEP 2013 00:
static const unsigned int POS_REWARD_FIX_TIME = 1383177600; // 31 OCT 2013 00:00:00
static const unsigned int POS_REWARD_FIX_TIME2 = 1383606000; // 04 Nov 2013 23:00:00
static const unsigned int VERSION1_5_SWITCH_TIME = 1421489410; // Sat, 17 Jan 2015 10:10:10 GMT

static const int VERSION1_5_SWITCH_BLOCK = 1600000; // Block 1.6 million, approx same time

static const int POW_LIMIT_HEIGHT_TESTNET = 4500; // Limit Flash PoW Mining TestNet.
Expand All @@ -76,11 +77,11 @@ static const int POW_LIMIT_HEIGHT = 5600000 ; // Limit Flash PoW Mining.
static const int POW_STOP_HEIGHT = 6000000; // Limit PoW Mining.
static const int64_t POW_TIME_LIMIT = 60 * 10; // Time for PoW to wait to find block

static const unsigned int SIG_SWITCH_TIME = 1519900000; // Thu, 01 Mar 2018 10:26:40 GMT



static const unsigned int VERSION_2_0_SWITCH_TIME = 1505509200; // Fri, 15 Sep 2017 21:00:00
static const int SPACING_TARGET_SWITCH = 5667000; // Change The Spacing Time

static const unsigned int VERSION_2_0_SWITCH_TIME_TESTNET = 1505002972; // TESTNET
static const int SPACING_TARGET_SWITCH_TESTNET = 6390; // Change The Spacing Time TESTNET

inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
Expand Down Expand Up @@ -115,10 +116,8 @@ extern std::map<uint256, CBlockIndex*> mapBlockIndex;
extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
extern uint256 hashGenesisBlock;
extern CBlockIndex* pindexGenesisBlock;
extern unsigned int nStakeMinAge;
extern unsigned int nStakeMaxAge;
extern unsigned int nNodeLifespan;
extern unsigned int nStakeTargetSpacing;
extern int nCoinbaseMaturity;
extern int nCoinbaseMaturityMultipiler;
extern int nBestHeight;
Expand Down Expand Up @@ -160,6 +159,8 @@ class CTxIndex;
class CScriptCheck;
struct CNodeStateStats;

unsigned int SetTargetSpacing();
unsigned int SetStakeMinAge();
void RegisterWallet(CWallet* pwalletIn);
void UnregisterWallet(CWallet* pwalletIn);
void UnregisterAllWallets();
Expand Down Expand Up @@ -194,6 +195,7 @@ int64_t GetProofOfWorkReward();
int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, unsigned int nTime ,bool bCoinYearOnly=false);
int64_t GetProofOfStakeRewardV1(int64_t nCoinAge, unsigned int nBits, unsigned int nTime ,bool bCoinYearOnly=false);
int64_t GetProofOfStakeRewardV2(int64_t nCoinAge, unsigned int nBits, unsigned int nTime ,bool bCoinYearOnly=false);
int64_t GetProofOfStakeRewardV3(int64_t nCoinAge, unsigned int nBits, unsigned int nTime ,bool bCoinYearOnly=false);
unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
unsigned int ComputeMinStake(unsigned int nBase, int64_t nTime, unsigned int nBlockTime);

Expand Down
2 changes: 1 addition & 1 deletion src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ double ClientModel::getPosKernalPS()

int ClientModel::getStakeTargetSpacing()
{
return nStakeTargetSpacing;
return SetTargetSpacing();
}

quint64 ClientModel::getTotalBytesRecv() const
Expand Down
Loading

0 comments on commit e9d6e2e

Please sign in to comment.