]> Git Repo - VerusCoin.git/blobdiff - src/coins.h
Bools
[VerusCoin.git] / src / coins.h
index bf4bc7af343330b3ab5f7a426674130fa867e4f4..fcc32caaed02f66d7cfc120a144b0ca91178d862 100644 (file)
@@ -6,7 +6,10 @@
 #ifndef BITCOIN_COINS_H
 #define BITCOIN_COINS_H
 
+#define KOMODO_ENABLE_INTEREST //enabling this is a hardfork, activate with new RR method
+
 #include "compressor.h"
+#include "core_memusage.h"
 #include "memusage.h"
 #include "serialize.h"
 #include "uint256.h"
@@ -85,14 +88,14 @@ public:
     //! version of the CTransaction; accesses to this value should probably check for nHeight as well,
     //! as new tx version will probably only be introduced at certain heights
     int nVersion;
-    uint32_t nLockTime;
+    //uint32_t nLockTime;
 
     void FromTx(const CTransaction &tx, int nHeightIn) {
         fCoinBase = tx.IsCoinBase();
         vout = tx.vout;
         nHeight = nHeightIn;
         nVersion = tx.nVersion;
-        nLockTime = tx.nLockTime;
+        //nLockTime = tx.nLockTime;
         ClearUnspendable();
     }
 
@@ -168,7 +171,7 @@ public:
         nSize += ::GetSerializeSize(VARINT(nCode), nType, nVersion);
         // spentness bitmask
         nSize += nMaskSize;
-        // txouts themself
+        // txouts
         for (unsigned int i = 0; i < vout.size(); i++)
             if (!vout[i].IsNull())
                 nSize += ::GetSerializeSize(CTxOutCompressor(REF(vout[i])), nType, nVersion);
@@ -260,8 +263,7 @@ public:
     size_t DynamicMemoryUsage() const {
         size_t ret = memusage::DynamicUsage(vout);
         BOOST_FOREACH(const CTxOut &out, vout) {
-            const std::vector<unsigned char> *script = &out.scriptPubKey;
-            ret += memusage::DynamicUsage(*script);
+            ret += RecursiveDynamicUsage(out.scriptPubKey);
         }
         return ret;
     }
@@ -512,7 +514,7 @@ public:
      * @param[in] tx   transaction for which we are checking input total
      * @return Sum of value of all inputs (scriptSigs)
      */
-    CAmount GetValueIn(int64_t *interestp,const CTransaction& tx,uint32_t prevblocktime) const;
+    CAmount GetValueIn(int32_t nHeight,int64_t *interestp,const CTransaction& tx,uint32_t prevblocktime) const;
 
     //! Check whether all prevouts of the transaction are present in the UTXO set represented by this view
     bool HaveInputs(const CTransaction& tx) const;
This page took 0.023251 seconds and 4 git commands to generate.