Skip to content

Commit

Permalink
fix block reward
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenbergthecoder committed Feb 17, 2019
1 parent b962992 commit 5d62c98
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class CMainParams : public CChainParams {
hashGenesisBlock = genesis.GetHash();


//printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
//printf("genesis.hashMerkleRoot = %s\n", genesis.hashMerkleRoot.ToString().c_str());
//printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
//printf("genesis.hashMerkleRoot = %s\n", genesis.hashMerkleRoot.ToString().c_str());



Expand All @@ -103,11 +103,11 @@ class CMainParams : public CChainParams {
base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();

vSeeds.push_back(CDNSSeedData("0", "201.73.79.39"));
vSeeds.push_back(CDNSSeedData("1", "94.177.189.246"));
vSeeds.push_back(CDNSSeedData("2", "80.211.72.155"));
vSeeds.push_back(CDNSSeedData("0", "seed1.octopuscoins.com"));
vSeeds.push_back(CDNSSeedData("1", "seed2.octopuscoins.com"));
vSeeds.push_back(CDNSSeedData("2", "seed3.octopuscoins.com"));

convertSeeds(vFixedSeeds, pnSeed, ARRAYLEN(pnSeed), nDefaultPort);
convertSeeds(vFixedSeeds, pnSeed, ARRAYLEN(pnSeed), nDefaultPort);

nPoolMaxTransactions = 3;
//strSporkKey = "046f78dcf911fbd61910136f7f0f8d90578f68d0b3ac973b5040fb7afb501b5939f39b108b0569dca71488f5bbf498d92e4d1194f6f941307ffd95f75e76869f0e";
Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

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

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ bool IsPOSRewardValid(int64_t value, int64_t nFees) {
if (nHeight < TIERED_MASTERNODES_START_BLOCK) {
return value == (120*COIN + nFees);
}
else if (nHeight < 9157000 ) {
else if (nHeight < 157000 ) {
// Using BOOST_FOREACH for concistency with the rest of the code
BOOST_FOREACH(PAIRTYPE(const int, int)& tier, masternodeTierRewards)
{
Expand All @@ -1419,7 +1419,7 @@ bool IsPOSRewardValid(int64_t value, int64_t nFees) {
return true;
}
}
else if (nHeight < 9242600) {
else if (nHeight < 242600) {
// Using BOOST_FOREACH for concistency with the rest of the code
BOOST_FOREACH(PAIRTYPE(const int, int)& tier, masternodeTierRewards157000)
{
Expand Down
Binary file modified src/qt/res/images/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const std::string CLIENT_NAME("Octopus");
// git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
# define GIT_COMMIT_ID "60010"
# define GIT_COMMIT_ID "60020"
#endif

#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
Expand Down
12 changes: 6 additions & 6 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ static const int DATABASE_VERSION = 70509;
// network protocol versioning
//

static const int PROTOCOL_VERSION = 60010;
static const int PROTOCOL_VERSION = 60020;

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

// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 60010;
static const int MIN_PEER_PROTO_VERSION = 60020;

// minimum peer version accepted by DarkSendPool
static const int MIN_POOL_PEER_PROTO_VERSION = 60010;
static const int MIN_POOL_PEER_PROTO_VERSION = 60020;

static const int MIN_INSTANTX_PROTO_VERSION = 60010;
static const int MIN_INSTANTX_PROTO_VERSION = 60020;

// minimum peer version that can receive masternode payments
static const int MIN_MASTERNODE_PAYMENT_PROTO = 60010;
static const int MIN_MASTERNODE_PAYMENT_PROTO = 60020;

// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
static const int CADDR_TIME_VERSION = 31402;

// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 0;
static const int NOBLKS_VERSION_END = 60010;
static const int NOBLKS_VERSION_END = 60020;

// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 60000;
Expand Down
8 changes: 4 additions & 4 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3597,9 +3597,9 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
// after block TIERED_MASTERNODES_START_BLOCK we start with the tiered masternodes logic
if (pindexPrev->nHeight+1 >= TIERED_MASTERNODES_START_BLOCK) {
if (tier != 0) {
if (pindexPrev->nHeight+1 < 9157000)
if (pindexPrev->nHeight+1 < 157000)
masternodePayment = masternodeTierRewards[tier]*COIN + (int64_t) (nFees * ((double)masternodeTierRewards[tier]/(POS_REWARD_TIERED_MN+masternodeTierRewards[tier])));
else if (pindexPrev->nHeight+1 < 9242600)
else if (pindexPrev->nHeight+1 < 242600)
masternodePayment = masternodeTierRewards157000[tier]*COIN + (int64_t) (nFees * ((double)masternodeTierRewards157000[tier]/(POS_REWARD_TIERED_MN+masternodeTierRewards157000[tier])));
else
masternodePayment = masternodeTierRewards242600[tier]*COIN + (int64_t) (nFees * ((double)masternodeTierRewards242600[tier]/(POS_REWARD_TIERED_MN+masternodeTierRewards242600[tier])));
Expand All @@ -3611,9 +3611,9 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
nCredit += POS_REWARD_TIERED_MN*COIN + nFees;
LogPrintf("nCredit pos: %i\n", nCredit);
if (tier != 0) {
if (pindexPrev->nHeight+1 < 9157000)
if (pindexPrev->nHeight+1 < 157000)
nCredit += masternodeTierRewards[tier]*COIN;
else if (pindexPrev->nHeight+1 < 9242600)
else if (pindexPrev->nHeight+1 < 242600)
nCredit += masternodeTierRewards157000[tier]*COIN;
else
nCredit += masternodeTierRewards242600[tier]*COIN;
Expand Down

0 comments on commit 5d62c98

Please sign in to comment.