#include "wallet.h"
#include "base58.h"
-#ifdef _MSC_VER
-#pragma warning( disable : 4345)
-#endif
-
using namespace std;
bool KernelRecord::showTransaction(const CWalletTx &wtx)
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)));
}
}
}