int64_t nTime = wtx.GetTxTime();
uint256 hash = wtx.GetHash();
std::map<std::string, std::string> mapValue = wtx.mapValue;
- int64_t nDayWeight = (min((GetAdjustedTime() - nTime), (int64_t)(nStakeMaxAge+nStakeMinAge)) - nStakeMinAge); // DayWeight * 86400, чтобы был
- // правильный расчёт CoinAge
if (showTransaction(wtx))
{
for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
CTxDestination address;
std::string addrStr;
- uint64_t coinAge = max( (txOut.nValue * nDayWeight) / (COIN * nOneDay), (int64_t)0);
-
if (ExtractDestination(txOut.scriptPubKey, address))
{
// Sent to Bitcoin Address
addrStr = mapValue["to"];
}
- parts.push_back(KernelRecord(hash, nTime, addrStr, txOut.nValue, wtx.IsSpent(nOut), coinAge));
+ parts.push_back(KernelRecord(hash, nTime, addrStr, txOut.nValue, wtx.IsSpent(nOut)));
}
}
}
{
public:
KernelRecord():
- hash(), nTime(0), address(""), nValue(0), idx(0), spent(false), coinAge(0), prevMinutes(0), prevDifficulty(0), prevProbability(0)
+ hash(), nTime(0), address(""), nValue(0), idx(0), spent(false), prevMinutes(0), prevDifficulty(0), prevProbability(0)
{
}
KernelRecord(uint256 hash, int64_t nTime):
- hash(hash), nTime(nTime), address(""), nValue(0), idx(0), spent(false), coinAge(0), prevMinutes(0), prevDifficulty(0), prevProbability(0)
+ hash(hash), nTime(nTime), address(""), nValue(0), idx(0), spent(false), prevMinutes(0), prevDifficulty(0), prevProbability(0)
{
}
- KernelRecord(uint256 hash, int64_t nTime,
- const std::string &address,
- int64_t nValue, bool spent, int64_t coinAge):
+ KernelRecord(uint256 hash, int64_t nTime, const std::string &address, int64_t nValue, bool spent):
hash(hash), nTime(nTime), address(address), nValue(nValue),
- idx(0), spent(spent), coinAge(coinAge), prevMinutes(0), prevDifficulty(0), prevProbability(0)
+ idx(0), spent(spent), prevMinutes(0), prevDifficulty(0), prevProbability(0)
{
}
int64_t nValue;
int idx;
bool spent;
- int64_t coinAge;
std::string getTxID();
int64_t getAge() const;