diff --git a/src/main.cpp b/src/main.cpp index 5e5263c5f1..3a652f72fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -52,6 +52,9 @@ bool fImporting = false; bool fReindex = false; bool fBenchmark = false; bool fTxIndex = false; +bool fLargeWorkForkFound = false; +bool fLargeWorkInvalidChainFound = false; + unsigned int nCoinCacheSize = 5000; /** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */ @@ -1775,8 +1778,6 @@ bool IsInitialBlockDownload() chainActive.Tip()->GetBlockTime() < GetTime() - 24 * 60 * 60); } -bool fLargeWorkForkFound = false; -bool fLargeWorkInvalidChainFound = false; CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL; void CheckForkWarningConditions() diff --git a/src/main.h b/src/main.h index d830271e1f..411b0d38ab 100644 --- a/src/main.h +++ b/src/main.h @@ -108,7 +108,8 @@ extern int nScriptCheckThreads; extern bool fTxIndex; extern unsigned int nCoinCacheSize; -extern bool fManyOrphansFound; +extern bool fLargeWorkForkFound; +extern bool fLargeWorkInvalidChainFound; // Minimum disk space required - used in CheckDiskSpace() static const uint64_t nMinDiskSpace = 52428800; diff --git a/src/wallet.cpp b/src/wallet.cpp index c74f3e4750..a3d04fe90b 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1847,6 +1847,7 @@ bool CWallet::CreateTransaction(const vector >& vecSend, LOCK2(cs_main, cs_wallet); { nFeeRet = nTransactionFee; + if(useIX && nFeeRet < CENT) nFeeRet = CENT; while (true) { wtxNew.vin.clear(); @@ -1919,10 +1920,10 @@ bool CWallet::CreateTransaction(const vector >& vecSend, nFeeRet = nChange; nChange = 0; wtxNew.mapValue["DS"] = "1"; - } else if(useIX && nFeeRet < COIN*0.01 && nChange > ((COIN*0.01)-nFeeRet)) { + } else if(useIX && nFeeRet < CENT && nChange > (CENT-nFeeRet)) { // IX has a minimum fee of 0.01 DRK - nChange -= (COIN*0.01)-nFeeRet; - nFeeRet = COIN*0.01; + nChange -= CENT-nFeeRet; + nFeeRet = CENT; } if (nChange > 0)