Refactors in anticipation of blinded values

This commit is contained in:
Luke Dashjr 2015-05-20 05:10:07 +00:00 committed by Matt Corallo
parent 20339a9b92
commit b05e98bc9c
14 changed files with 203 additions and 77 deletions

View file

@ -123,8 +123,11 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
UniValue out(UniValue::VOBJ);
UniValue outValue(UniValue::VNUM, FormatMoney(txout.nValue));
out.pushKV("value", outValue);
if (txout.nValue.IsAmount())
{
UniValue outValue(UniValue::VNUM, FormatMoney(txout.nValue.GetAmount()));
out.pushKV("value", outValue);
}
out.pushKV("n", (int64_t)i);
UniValue o(UniValue::VOBJ);