aboutsummaryrefslogtreecommitdiff
path: root/src/core_write.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-08-22 18:02:33 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-09-06 13:07:45 -0700
commit5c8ff0d448ffdc6340b195ddfa2128d5f21a839b (patch)
tree63a83a0708303a8d8382739c283bb41e07bdc5fe /src/core_write.cpp
parent6866b4912b8013ed748d12250209f7079a3c92e6 (diff)
downloadbitcoin-5c8ff0d448ffdc6340b195ddfa2128d5f21a839b.tar.xz
Introduce wrappers around CBitcoinAddress
This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
Diffstat (limited to 'src/core_write.cpp')
-rw-r--r--src/core_write.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 1431fa0c9b..e16db13650 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -148,8 +148,9 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey,
out.pushKV("type", GetTxnOutputType(type));
UniValue a(UniValue::VARR);
- for (const CTxDestination& addr : addresses)
- a.push_back(CBitcoinAddress(addr).ToString());
+ for (const CTxDestination& addr : addresses) {
+ a.push_back(EncodeDestination(addr));
+ }
out.pushKV("addresses", a);
}