Skip to content
Permalink
Browse files

v1.1.0.0

  • Loading branch information...
ODUWAX committed Mar 23, 2019
1 parent d1616b3 commit 92dd2619e848f36a3539b4e3e7c4060e447ca580
Showing with 29 additions and 14 deletions.
  1. +6 −1 src/checkpoints.cpp
  2. +1 −1 src/clientversion.h
  3. +12 −3 src/main.cpp
  4. +1 −1 src/main.h
  5. +4 −4 src/version.cpp
  6. +3 −3 src/version.h
  7. +2 −1 src/wallet.cpp
@@ -27,7 +27,12 @@ namespace Checkpoints
//
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, hashGenesisBlock )
(0, hashGenesisBlock)
(244260, uint256("0x34cb64db3f25b869794a52a156ab2ef4d9cc2e8635660e9495f14f0fccd0125b"))
(244261, uint256("0x3928e448b5499715ed1cb6c48a38728cd0fe72d0385ffd57470aa8d9fefc2841"))
(244262, uint256("0x0304aef8843f995125235a4d80ce3a70981a68e7b1048948cf04fbfffb5e69c3"))
(244300, uint256("0xc29c11687dce9b2ead8863f9904ccd07d70e77bce0942bd99c039e02cef69c59"))
(245300, uint256("0xbc56f6ad6122fcc000dd4b9d9e501dcfcefc736f83c3903ba3adccc90f4be49d"))
;

// TestNet has no checkpoints
@@ -7,7 +7,7 @@

// 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 0
#define CLIENT_VERSION_MINOR 1
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

@@ -1024,9 +1024,17 @@ int64_t GetProofOfWorkReward(int64_t nFees)
}

// miner's coin stake reward based on coin age spent (coin-days)
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees, int64_t bHeight)
{
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);
int64_t nSubsidy;


if (bHeight <= 245450) {
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);
}
else {
nSubsidy = nCoinAge * 2 * 33 * CENT / (365 * 33 + 8);
}

if (fDebug && GetBoolArg("-printcreation"))
printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nCoinAge);
@@ -1600,7 +1608,8 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck)
if (!vtx[1].GetCoinAge(txdb, nCoinAge))
return error("ConnectBlock() : %s unable to get coin age for coinstake", vtx[1].GetHash().ToString().substr(0,10).c_str());

int64_t nCalculatedStakeReward = GetProofOfStakeReward(nCoinAge, nFees);
int64_t bHeight = pindex->nHeight;
int64_t nCalculatedStakeReward = GetProofOfStakeReward(nCoinAge, nFees, bHeight);

if (nStakeReward > nCalculatedStakeReward)
return DoS(100, error("ConnectBlock() : coinstake pays too much(actual=%"PRId64" vs calculated=%"PRId64")", nStakeReward, nCalculatedStakeReward));
@@ -120,7 +120,7 @@ bool LoadExternalBlockFile(FILE* fileIn);
bool CheckProofOfWork(uint256 hash, unsigned int nBits);
unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake);
int64_t GetProofOfWorkReward(int64_t nFees);
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees);
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees , int64_t bHeight);
unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
unsigned int ComputeMinStake(unsigned int nBase, int64_t nTime, unsigned int nBlockTime);
int GetNumBlocksOfPeers();
@@ -36,15 +36,15 @@ const std::string CLIENT_NAME("Satoshi");
// git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
# define GIT_COMMIT_ID "32a928e"
# define GIT_COMMIT_DATE "$Format:%cD"
# define GIT_COMMIT_ID ""
# define GIT_COMMIT_DATE ""
#endif

#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "" commit

#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) ""

#ifndef BUILD_DESC
# ifdef GIT_COMMIT_ID
@@ -30,13 +30,13 @@ static const int DATABASE_VERSION = 70509;
// network protocol versioning
//

static const int PROTOCOL_VERSION = 60013;
static const int PROTOCOL_VERSION = 60015;

// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
static const int INIT_PROTO_VERSION = 60015;

// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 209;
static const int MIN_PEER_PROTO_VERSION = 60015;

// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
@@ -1735,7 +1735,8 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
if (!txNew.GetCoinAge(txdb, nCoinAge))
return error("CreateCoinStake : failed to calculate coin age");

int64_t nReward = GetProofOfStakeReward(nCoinAge, nFees);
int64_t bHeight = pindexPrev->nHeight + 1;
int64_t nReward = GetProofOfStakeReward(nCoinAge, nFees, bHeight);
if (nReward <= 0)
return false;

0 comments on commit 92dd261

Please sign in to comment.
You can’t perform that action at this time.