chains stuck
just cant quite generate block #525600
https://github.com/communitycoin/communitycoin/blob/d1db307f863da8d47aeb77d1ca8a0cb663d22fb5/src/main.cpp#L975// miner's coin stake reward based on nBits and coin age spent (coin-days)
// simple algorithm, not depend on the diff
const int YEARLY_BLOCKCOUNT = 525600; // 365 * 1440
int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime, int nHeight)
{
int64 nRewardCoinYear;
nRewardCoinYear = MAX_MINT_PROOF_OF_STAKE;
if(nHeight < YEARLY_BLOCKCOUNT)
nRewardCoinYear = 30 * MAX_MINT_PROOF_OF_STAKE;
else if(nHeight < (2 * YEARLY_BLOCKCOUNT))
nRewardCoinYear = 20 * MAX_MINT_PROOF_OF_STAKE;
else if(nHeight < (3 * YEARLY_BLOCKCOUNT))
vs debug.log
CPUMiner : proof-of-stake block found 42efe8d2c5f27ee199ee111a3c41857a8ba3e12c4440a6f3e1535ae961c049ed
BitcoinMiner:
new block found
hash: 42efe8d2c5f27ee199ee111a3c41857a8ba3e12c4440a6f3e1535ae961c049ed
target: 00000001a4290000000000000000000000000000000000000000000000000000
CBlock(hash=42efe8d2c5f27ee199ee111a3c41857a8ba3e12c4440a6f3e1535ae961c049ed, ver=4, hashPrevBlock=180c7274ff845399ec9d5aab0f88041b3fb2316be822500fdcdafcf8f47f6224, hashMerkleRoot=841fa10c28b3a34be0ddd0a31cb7f2e375a7819bce2756db5413e6711d17d5bd, nTime=1433249149, nBits=1d01a429, nNonce=0, vtx=2, vchBlockSig=3046022100832b35ce086ee5d20c6ea2f70f71aa2a7cb270b7d4a6043201464cf23974784b022100913e79fde55c21d47ccdf170a6ce30ef1ef6a2b9db5d58e4dd9ede3202b8ef84)
Coinbase(hash=8f0feec0c2, nTime=1433249149, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000, 4294967295), coinbase 03200508029d01062f503253482f)
CTxOut(empty)
Coinstake(hash=9ba09e4e01, nTime=1433249149, ver=1, vin.size=1, vout.size=2, nLockTime=0)
CTxIn(COutPoint(15462b02cb, 1), scriptSig=304402201fdfe112a492418a)
CTxOut(empty)
CTxOut(nValue=846.891369, scriptPubKey=04f1b213ea4588dd2d54b078c5367c1fa9ade8edb1eeb31155ff9336639ee93771e76178123d94e9101ff5bc31735502000f01cc0d4ae2c6dd49b0e26111fb628f OP_CHECKSIG)
vMerkleTree: 8f0feec0c2 9ba09e4e01 841fa10c28
generated 0.00
ERROR: ConnectInputs() : 9ba09e4e01 stake reward exceeded
also
https://github.com/communitycoin/communitycoin/blob/d1db307f863da8d47aeb77d1ca8a0cb663d22fb5/src/main.cpp#L1399
int64 nStakeReward = GetValueOut() - nValueIn;
if (nStakeReward > GetProofOfStakeReward(nCoinAge, pindexBlock->nBits, nTime, pindexBlock->nHeight) - GetMinFee() + MIN_TX_FEE)
return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str()));
}