#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"
//! 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();
}
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);
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;
}
* @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;