|
|
@ -1585,8 +1585,8 @@ bool timestampSort(std::pair<CMempoolAddressDeltaKey, CMempoolAddressDelta> a, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CurrencyValuesAndNames(UniValue &output, bool spending, const CScript script, CAmount satoshis, bool friendlyNames=false); |
|
|
|
void CurrencyValuesAndNames(UniValue &output, bool spending, const CScript script, CAmount satoshis, bool friendlyNames) |
|
|
|
void CurrencyValuesAndNames(UniValue &output, bool spending, const CScript &script, CAmount satoshis, bool friendlyNames=false); |
|
|
|
void CurrencyValuesAndNames(UniValue &output, bool spending, const CScript &script, CAmount satoshis, bool friendlyNames) |
|
|
|
{ |
|
|
|
if (CConstVerusSolutionVector::GetVersionByHeight(chainActive.Height()) >= CActivationHeight::ACTIVATE_PBAAS) |
|
|
|
{ |
|
|
@ -1609,7 +1609,7 @@ void CurrencyValuesAndNames(UniValue &output, bool spending, const CScript scrip |
|
|
|
currencyBal.push_back(make_pair(name, ValueFromAmount(oneBalance.second))); |
|
|
|
if (friendlyNames) |
|
|
|
{ |
|
|
|
currencyNames.push_back(make_pair(name, ConnectedChains.GetFriendlyCurrencyName(oneBalance.first))); |
|
|
|
currencyNames.pushKV(name, ConnectedChains.GetFriendlyCurrencyName(oneBalance.first)); |
|
|
|
} |
|
|
|
} |
|
|
|
output.pushKV("currencyvalues", currencyBal); |
|
|
@ -1795,7 +1795,8 @@ UniValue getaddressutxos(const UniValue& params, bool fHelp) |
|
|
|
|
|
|
|
std::string address = ""; |
|
|
|
|
|
|
|
if (it->second.script.IsPayToCryptoCondition()) |
|
|
|
COptCCParams p; |
|
|
|
if (it->second.script.IsPayToCryptoCondition(p) && p.IsValid()) |
|
|
|
{ |
|
|
|
txnouttype outType; |
|
|
|
std::vector<CTxDestination> addresses; |
|
|
@ -1826,7 +1827,14 @@ UniValue getaddressutxos(const UniValue& params, bool fHelp) |
|
|
|
output.push_back(Pair("txid", it->first.txhash.GetHex())); |
|
|
|
output.push_back(Pair("outputIndex", (int)it->first.index)); |
|
|
|
output.push_back(Pair("script", HexStr(it->second.script.begin(), it->second.script.end()))); |
|
|
|
CurrencyValuesAndNames(output, false, it->second.script, it->second.satoshis, friendlyNames); |
|
|
|
if (p.IsValid()) |
|
|
|
{ |
|
|
|
CurrencyValuesAndNames(output, false, it->second.script, it->second.satoshis, friendlyNames); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
UniValue |
|
|
|
} |
|
|
|
output.push_back(Pair("satoshis", it->second.satoshis)); |
|
|
|
output.push_back(Pair("height", it->second.blockHeight)); |
|
|
|
if (chainActive.Height() >= it->second.blockHeight) |
|
|
|