Changeset View
Changeset View
Standalone View
Standalone View
src/dstencode.cpp
// Copyright (c) 2017 The Bitcoin developers | // Copyright (c) 2017 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "dstencode.h" | #include <dstencode.h> | ||||
#include "base58.h" | |||||
#include "cashaddrenc.h" | #include <base58.h> | ||||
#include "chainparams.h" | #include <cashaddrenc.h> | ||||
#include "config.h" | #include <chainparams.h> | ||||
#include "script/standard.h" | #include <config.h> | ||||
#include <script/standard.h> | |||||
std::string EncodeDestination(const CTxDestination &dest, | std::string EncodeDestination(const CTxDestination &dest, | ||||
const Config &config) { | const Config &config) { | ||||
const CChainParams ¶ms = config.GetChainParams(); | const CChainParams ¶ms = config.GetChainParams(); | ||||
return config.UseCashAddrEncoding() ? EncodeCashAddr(dest, params) | return config.UseCashAddrEncoding() ? EncodeCashAddr(dest, params) | ||||
: EncodeLegacyAddr(dest, params); | : EncodeLegacyAddr(dest, params); | ||||
} | } | ||||
Show All 17 Lines |