Proposed update to POS Minting control parameters #62

Merged
merged 3 commits into from Jul 13, 2014
Jump to file or symbol
Failed to load files and symbols.
+8 −9
Split
View
@@ -130,7 +130,7 @@ Section E - Build the OpenSSL Library
of openssl we need from the Internet.
3 - Type " md5sum openssl-1.0.1g.tar.gz " and make sure you get
- 66bf6f10f060d561929de96f9dfe5b8c
+ de62b43dfcd858e66a74bee1c834e959
4 - Type " tar xvzf openssl-1.0.1g.tar.gz " to extract the source files.
View
@@ -37,7 +37,7 @@ http://www.openssl.org/source/openssl-1.0.1g.tar.gz
7) Type:
cd /c/deps
-md5sum openssl-1.0.1g.tar.gz # make sure you get 66bf6f10f060d561929de96f9dfe5b8c
+md5sum openssl-1.0.1g.tar.gz # make sure you get de62b43dfcd858e66a74bee1c834e959
tar xvzf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./config
View
@@ -1395,10 +1395,11 @@ bool CWallet::CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& w
// ppcoin: create coin stake transaction
bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew)
{
- // The following split & combine thresholds are important to security
- // Should not be adjusted if you don't understand the consequences
- static unsigned int nStakeSplitAge = (60 * 60 * 24 * 90);
- int64 nCombineThreshold = GetProofOfWorkReward(GetLastBlockIndex(pindexBest, false)->nBits) / 3;
+ // Keep combining coins until 10 times POW reward is reached.
+ int64 nCombineThreshold = GetProofOfWorkReward(GetLastBlockIndex(pindexBest, false)->nBits) * 10;
+ // Minimum age for coins that will be combined.
+ unsigned int nStakeCombineAge = 60 * 60 * 24 * 31;
+
// Keep a table of stuff to speed up POS mining
static map<uint256, PosMiningStuff *> mapMiningStuff;
@@ -1523,8 +1524,6 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
nCredit += pcoin.first->vout[pcoin.second].nValue;
vwtxPrev.push_back(pcoin.first);
txNew.vout.push_back(CTxOut(0, scriptPubKeyOut));
- if (block.GetBlockTime() + nStakeSplitAge > txNew.nTime)
- txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); //split stake
if (fDebug && GetBoolArg("-printcoinstake"))
printf("CreateCoinStake : added kernel type=%d\n", whichType);
fKernelFound = true;
@@ -1556,7 +1555,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
if (pcoin.first->vout[pcoin.second].nValue > nCombineThreshold)
continue;
// Do not add input that is still too young
- if (pcoin.first->nTime + nStakeMaxAge > txNew.nTime)
+ if (pcoin.first->nTime + nStakeCombineAge > txNew.nTime)
continue;
txNew.vin.push_back(CTxIn(pcoin.first->GetHash(), pcoin.second));
nCredit += pcoin.first->vout[pcoin.second].nValue;