diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 5f47ba352..1f7267701 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -144,7 +144,8 @@ bool AppInit(int argc, char* argv[]) fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { - fprintf(stdout, "Komodo server starting\n"); + extern char ASSETCHAINS_SYMBOL[16]; + fprintf(stdout, "Komodo %s server starting\n",ASSETCHAINS_SYMBOL); // Daemonize pid_t pid = fork(); diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index a65f42836..4b5cdae35 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -253,8 +253,6 @@ Value getrawtransaction(const Array& params, bool fHelp) return result; } -uint32_t komodo_interest_args(int32_t *txheightp,uint32_t *tiptimep,uint64_t *valuep,uint256 hash,int32_t n); - Value gettxoutproof(const Array& params, bool fHelp) { if (fHelp || (params.size() != 1 && params.size() != 2)) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index f1f64b042..adb6b36bc 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -253,11 +253,12 @@ Value help(const Array& params, bool fHelp) Value stop(const Array& params, bool fHelp) { - // Accept the deprecated and ignored 'detach' boolean argument + extern char ASSETCHAINS_SYMBOL[16]; + // Accept the deprecated and ignored 'detach' boolean argument if (fHelp || params.size() > 1) throw runtime_error( "stop\n" - "\nStop Komodo server."); + "\nStop Komodo %s server.",ASSETCHAINS_SYMBOL); // Shutdown will take long enough that the response should get back StartShutdown(); return "Komodo server stopping"; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1a9e477d8..01832e173 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2354,7 +2354,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int return true; } -uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime); +uint64_t komodo_accrued_interest(uint256 hash,int32_t n,int32_t checkheight,uint64_t checkvalue); bool CWallet::SelectCoins(const CAmount& nTargetValue, set >& setCoinsRet, CAmount& nValueRet, bool& fOnlyCoinbaseCoinsRet, bool& fNeedCoinbaseCoinsRet, const CCoinControl* coinControl) const { @@ -2400,13 +2400,13 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, setvout[out.i].nValue; #ifdef KOMODO_ENABLE_INTEREST if ( strcmp(ASSETCHAINS_SYMBOL,"REVS") == 0 )//&& chainActive.Tip()->nHeight+1 >= 60000 ) - { + {sss uint64_t interest; interest = komodo_interest(chainActive.Tip()->nHeight+1,out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime); - if ( interest != 0 || out.tx->vout[out.i].nValue >= COIN*100 ) + //if ( interest != 0 || out.tx->vout[out.i].nValue >= COIN*100 ) { - printf("nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)out.tx->vout[out.i].nValue/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); - fprintf(stderr,"nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueRet/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); + printf("wallet nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)out.tx->vout[out.i].nValue/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); + fprintf(stderr,"wallet nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueRet/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); } nValueRet += interest; }