Add dpowconfs to z_listunspent + listreceivedbyaddress and other small fixes

This commit is contained in:
Jonathan "Duke" Leto
2019-01-05 19:24:14 +01:00
parent 6a1259ba5b
commit f24ae214d2
3 changed files with 32 additions and 13 deletions

View File

@@ -297,6 +297,7 @@ void TxToJSONExpanded(const CTransaction& tx, const uint256 hashBlock, UniValue&
} else {
entry.push_back(Pair("height", -1));
entry.push_back(Pair("confirmations", 0));
entry.push_back(Pair("rawconfirmations", 0));
}
}
@@ -379,9 +380,10 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
entry.push_back(Pair("confirmations", komodo_dpowconfs(pindex->GetHeight(),1 + chainActive.Height() - pindex->GetHeight())));
entry.push_back(Pair("time", pindex->GetBlockTime()));
entry.push_back(Pair("blocktime", pindex->GetBlockTime()));
}
else
} else {
entry.push_back(Pair("confirmations", 0));
entry.push_back(Pair("rawconfirmations", 0));
}
}
}
}
@@ -469,7 +471,8 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp)
" ,...\n"
" ],\n"
" \"blockhash\" : \"hash\", (string) the block hash\n"
" \"confirmations\" : n, (numeric) The confirmations\n"
" \"confirmations\" : n, (numeric) The number of notarized DPoW confirmations\n"
" \"rawconfirmations\" : n, (numeric) The number of raw confirmations\n"
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
"}\n"