rawconfirmations

This commit is contained in:
jl777
2018-10-14 12:39:06 -11:00
parent 20523c958c
commit a079cdbc6c
3 changed files with 4 additions and 4 deletions

View File

@@ -391,7 +391,7 @@ int32_t notarizedtxid_height(char *dest,char *txidstr,int32_t *kmdnotarized_heig
{
if ( (item= jobj(json,(char *)"result")) != 0 )
{
txid_confirmations = jint(item,(char *)"origconfirmations");
txid_confirmations = jint(item,(char *)"rawconfirmations");
if ( txid_confirmations > 0 && height > txid_confirmations )
txid_height = height - txid_confirmations;
else txid_height = height;

View File

@@ -232,7 +232,7 @@ void TxToJSONExpanded(const CTransaction& tx, const uint256 hashBlock, UniValue&
if (nConfirmations > 0) {
entry.push_back(Pair("height", nHeight));
entry.push_back(Pair("confirmations", komodo_dpowconfs(nHeight,nConfirmations)));
entry.push_back(Pair("origconfirmations", nConfirmations));
entry.push_back(Pair("rawconfirmations", nConfirmations));
entry.push_back(Pair("time", nBlockTime));
entry.push_back(Pair("blocktime", nBlockTime));
} else {
@@ -292,7 +292,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
CBlockIndex* pindex = (*mi).second;
if (chainActive.Contains(pindex)) {
entry.push_back(Pair("height", pindex->nHeight));
entry.push_back(Pair("origconfirmations", 1 + chainActive.Height() - pindex->nHeight));
entry.push_back(Pair("rawconfirmations", 1 + chainActive.Height() - pindex->nHeight));
entry.push_back(Pair("confirmations", komodo_dpowconfs(pindex->nHeight,1 + chainActive.Height() - pindex->nHeight)));
entry.push_back(Pair("time", pindex->GetBlockTime()));
entry.push_back(Pair("blocktime", pindex->GetBlockTime()));

View File

@@ -2735,7 +2735,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
}
else if ( chainActive.LastTip() != 0 )
txheight = (chainActive.LastTip()->nHeight - out.nDepth - 1);
entry.push_back(Pair("origconfirmations",out.nDepth));
entry.push_back(Pair("rawconfirmations",out.nDepth));
entry.push_back(Pair("confirmations",komodo_dpowconfs(txheight,out.nDepth)));
entry.push_back(Pair("spendable", out.fSpendable));
results.push_back(entry);