CA: Remove CAsset::ToString() as it is exactly identical in implementation to CAsset::GetHex(), and GetHex() more clearly matches up with the actual semantics.

This commit is contained in:
Mark Friedenbach 2017-03-04 15:59:45 -08:00 committed by Gregory Sanders
parent 9897078ec8
commit ba3926500f
2 changed files with 1 additions and 2 deletions

View file

@ -52,7 +52,6 @@ struct CAsset {
std::string GetHex() const { return id.GetHex(); }
void SetHex(const std::string& str) { id.SetHex(str); }
std::string ToString() const { return id.ToString(); }
friend bool operator==(const CAsset& a, const CAsset& b)
{

View file

@ -80,7 +80,7 @@ std::string CTxOut::ToString() const
{
std::string strAsset;
if (nAsset.IsAsset())
strAsset = strprintf("nAsset=%s, ", nAsset.GetAsset().ToString());
strAsset = strprintf("nAsset=%s, ", nAsset.GetAsset().GetHex());
if (nAsset.IsAssetCommitment())
strAsset = std::string("nAsset=UNKNOWN, ");
return strprintf("CTxOut(%snValue=%s, scriptPubKey=%s)", strAsset, (nValue.IsAmount() ? strprintf("%d.%08d", nValue.GetAmount() / COIN, nValue.GetAmount() % COIN) : std::string("UNKNOWN")), HexStr(scriptPubKey).substr(0, 30));