X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=bef76f7374fbd7669ff59e59a72603dca9389897;hb=bde280b9a4da2652716c8ffdeed9ebfa4461cc70;hp=81dd76fc49a6117345ca57c0bbb21907f839e88c;hpb=2a45a494b0bec6a0f1fc6ab7f26c260b85e7ff3e;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index 81dd76f..bef76f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -427,7 +427,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi return DoS(100, error("AcceptToMemoryPool() : coinbase as individual tx")); // To help v0.1.5 clients who would see it as a negative number - if ((int64)nLockTime > INT_MAX) + if ((int64)nLockTime > std::numeric_limits::max()) return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet"); // Rather not work on nonstandard transactions (unless -testnet) @@ -503,7 +503,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi return error("AcceptToMemoryPool() : transaction with out-of-bounds SigOpCount"); // Don't accept it if it can't get into a block - if (nFees < GetMinFee(1000, true, true)) + if (nFees < GetMinFee(1000, true, GMF_RELAY)) return error("AcceptToMemoryPool() : not enough fees"); // Continuously rate-limit free transactions @@ -902,7 +902,7 @@ bool CTransaction::FetchInputs(CTxDB& txdb, const map& mapTes { if (IsCoinBase()) return true; // Coinbase transactions have no inputs to fetch. - + for (int i = 0; i < vin.size(); i++) { COutPoint prevout = vin[i].prevout; @@ -2004,7 +2004,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } // Ask the first connected node for block updates - static int nAskedForBlocks; + static int nAskedForBlocks = 0; if (!pfrom->fClient && (pfrom->nVersion < 32000 || pfrom->nVersion >= 32400) && (nAskedForBlocks < 1 || vNodes.size() <= 1)) @@ -2959,7 +2959,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) // Transaction fee required depends on block size bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority)); - int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, true); + int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK); // Connecting shouldn't fail due to dependency on other memory pool transactions // because we're already processing them in order of dependency