Skip to content

Commit

Permalink
Merge pull request #8 from bumbacoin/fix
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
bumbacoin committed Feb 10, 2018
2 parents 8325d2b + d7f2b24 commit c5bd5ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ namespace Checkpoints
( 124887, uint256("0x0000000005666fc247f2aa72b470c5c60e9bbe93e07bb557b80d2baa7b8ba821" ))
( 196500, uint256("0x0000000002d754fefc4d0056b100bd8c9ac0d71c4366e404dc8d7ad5ae6861f4" ))
( 202438, uint256("0x57c66f75db90e9aa59e530c046694bd73573c58e332806b7fabadd7a6cef8bd4" ))

( 205412, uint256("0xfbbb0286e65ff03466eea94e20c68f2ca7ec45436300a28af700855a8c8701f8" ))

;


Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 3
#define CLIENT_VERSION_REVISION 3
#define CLIENT_VERSION_BUILD 0

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
18 changes: 9 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ int64_t GetProofOfWorkReward(int nHeight, int64_t nFees)
int64_t GetProofOfStakeReward(int nHeight, int64_t nCoinAge, int64_t nFees)
{
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);
CBigNum bnReward = 0;

if(nBestHeight <= 2500)
{
Expand Down Expand Up @@ -1098,29 +1099,28 @@ int64_t GetProofOfStakeReward(int nHeight, int64_t nCoinAge, int64_t nFees)
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8) / 2 ; //500%
}

else if (nHeight == 202438) //fixed reward due to overflow error in some clients
{
nSubsidy = 222790497759893 ;
}

else if (nBestHeight <= 250000)
{
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8) / 4 ; //250%
bnReward = CBigNum(nCoinAge * COIN_YEAR_REWARD) * 33 / (365 * 33 + 8) / 4 ; //250%
nSubsidy = bnReward.getuint64();
}

else if (nBestHeight <= 300000)
{
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8) / 8 ; //125%
bnReward = CBigNum(nCoinAge * COIN_YEAR_REWARD) * 33 / (365 * 33 + 8) / 8 ; //125%
nSubsidy = bnReward.getuint64();
}

else if (nBestHeight <= 350000)
{
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8) / 16 ; //62.5%
bnReward = CBigNum(nCoinAge * COIN_YEAR_REWARD) * 33 / (365 * 33 + 8) / 16 ; //62.5%
nSubsidy = bnReward.getuint64();
}

else if (nBestHeight > 350000)
{
nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8) / 40 ; //25%
bnReward = CBigNum(nCoinAge * COIN_YEAR_REWARD) * 33 / (365 * 33 + 8) / 40 ; //25%
nSubsidy = bnReward.getuint64();
}

if (fDebug && GetBoolArg("-printcreation"))
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const int DATABASE_VERSION = 70509;
// network protocol versioning
//

static const int PROTOCOL_VERSION = 60021;
static const int PROTOCOL_VERSION = 60022;

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

0 comments on commit c5bd5ec

Please sign in to comment.