diff --git a/src/komodo.h b/src/komodo.h index c5057646f..95aa1583a 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -25,6 +25,7 @@ #define KOMODO_ASSETCHAINS_WAITNOTARIZE #define KOMODO_PAXMAX (10000 * COIN) +#define KOMODO_ENDOFERA 7777777 #include #include diff --git a/src/komodo_interest.h b/src/komodo_interest.h index c5a35492d..917791498 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -19,6 +19,7 @@ #define KOMODO_INTEREST ((uint64_t)(0.05 * COIN)) // 5% int64_t MAX_MONEY = 200000000 * 100000000LL; +#ifdef notanymore uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest) { static uint64_t *interests; static int32_t maxheight; @@ -73,6 +74,7 @@ uint64_t komodo_moneysupply(int32_t height) return(0); else return(COIN * 100000000 + (height-1) * 3 + komodo_earned_interest(height,-1)); } +#endif uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { @@ -90,7 +92,7 @@ uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime uint64_t komodo_interestnew(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { uint64_t interest = 0; - if ( txheight < 7777777 && komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) + if ( txheight < KOMODO_ENDOFERA && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) //komodo_moneysupply(txheight) < MAX_MONEY && interest = _komodo_interestnew(nValue,nLockTime,tiptime); return(interest); } @@ -101,9 +103,9 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin activation = 1491350400; // 1491350400 5th April if ( ASSETCHAINS_SYMBOL[0] != 0 ) return(0); - if ( txheight >= 7777777 ) + if ( txheight >= KOMODO_ENDOFERA ) return(0); - if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) + if ( nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) //komodo_moneysupply(txheight) < MAX_MONEY && { if ( (minutes= (tiptime - nLockTime) / 60) >= 60 ) { diff --git a/src/main.cpp b/src/main.cpp index 8f028dbb7..e86a665ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1490,7 +1490,7 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex) return true; } -uint64_t komodo_moneysupply(int32_t height); +//uint64_t komodo_moneysupply(int32_t height); extern char ASSETCHAINS_SYMBOL[16]; extern uint32_t ASSETCHAINS_MAGIC; extern uint64_t ASSETCHAINS_SUPPLY; @@ -1502,7 +1502,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) { if ( nHeight == 1 ) return(100000000 * COIN); // ICO allocation - else if ( komodo_moneysupply(nHeight) < MAX_MONEY ) + else if ( nHeight < KOMODO_ENDOFERA ) //komodo_moneysupply(nHeight) < MAX_MONEY ) return(3 * COIN); else return(0); } @@ -2365,8 +2365,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin return false; control.Add(vChecks); } - if ( ASSETCHAINS_SYMBOL[0] == 0 ) - komodo_earned_interest(pindex->nHeight,sum); + //if ( ASSETCHAINS_SYMBOL[0] == 0 ) + // komodo_earned_interest(pindex->nHeight,sum); CTxUndo undoDummy; if (i > 0) { blockundo.vtxundo.push_back(CTxUndo());