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

@ -321,7 +321,6 @@ Value gettxoutsetinfo(const Array& params, bool fHelp)
ret.push_back(Pair("txouts", (int64_t)stats.nTransactionOutputs));
ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize));
ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex()));
ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount)));
}
return ret;
}
@ -394,7 +393,8 @@ Value gettxout(const Array& params, bool fHelp)
ret.push_back(Pair("confirmations", 0));
else
ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1));
ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue)));
if (coins.vout[n].nValue.IsAmount())
ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue.GetAmount())));
Object o;
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
ret.push_back(Pair("scriptPubKey", o));