From ba3926500f3fa24a9865ba5477c21b4bef8ea76d Mon Sep 17 00:00:00 2001 From: Mark Friedenbach Date: Sat, 4 Mar 2017 15:59:45 -0800 Subject: [PATCH] CA: Remove CAsset::ToString() as it is exactly identical in implementation to CAsset::GetHex(), and GetHex() more clearly matches up with the actual semantics. --- src/amount.h | 1 - src/primitives/transaction.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amount.h b/src/amount.h index bee4948ddc..39eb9b1488 100644 --- a/src/amount.h +++ b/src/amount.h @@ -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) { diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 3754535db5..2def36c162 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -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));