X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=7e62654298e65c99053a448bde6f3463f36c9aea;hb=c0e8991ed1b482d0dab75f86e415fc63d1104d68;hp=68190ad82c701793a802307947557ecac20caf79;hpb=f6123ec5244fa565ebeba660de94a47b28ef0105;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index 68190ad..7e62654 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,7 +77,8 @@ const string strMessageMagic = "NovaCoin Signed Message:\n"; // Settings int64 nTransactionFee = MIN_TX_FEE; -bool fStakeUsePooledKeys = false; +int64 nMinimumInputValue = MIN_TX_FEE; + extern enum Checkpoints::CPMode CheckpointsMode; ////////////////////////////////////////////////////////////////////////////// @@ -511,12 +512,11 @@ bool CTransaction::CheckTransaction() const } int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree, - enum GetMinFee_mode mode) const + enum GetMinFee_mode mode, unsigned int nBytes) const { // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE; - unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION); unsigned int nNewBlockSize = nBlockSize + nBytes; int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee; @@ -632,7 +632,7 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, unsigned int nSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); // Don't accept it if it can't get into a block - int64 txMinFee = tx.GetMinFee(1000, false, GMF_RELAY); + int64 txMinFee = tx.GetMinFee(1000, false, GMF_RELAY, nSize); if (nFees < txMinFee) return error("CTxMemPool::accept() : not enough fees %s, %"PRI64d" < %"PRI64d, hash.ToString().c_str(),