mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-21 09:22:18 +02:00
rpc: Simplify GetAllOutputTypes with the Join helper
This commit does not change behavior
This commit is contained in:
parent
02b26ba1c1
commit
fa41c65702
@ -511,12 +511,11 @@ static UniValue decoderawtransaction(const JSONRPCRequest& request)
|
|||||||
|
|
||||||
static std::string GetAllOutputTypes()
|
static std::string GetAllOutputTypes()
|
||||||
{
|
{
|
||||||
std::string ret;
|
std::vector<std::string> ret;
|
||||||
for (int i = TX_NONSTANDARD; i <= TX_WITNESS_UNKNOWN; ++i) {
|
for (int i = TX_NONSTANDARD; i <= TX_WITNESS_UNKNOWN; ++i) {
|
||||||
if (i != TX_NONSTANDARD) ret += ", ";
|
ret.emplace_back(GetTxnOutputType(static_cast<txnouttype>(i)));
|
||||||
ret += GetTxnOutputType(static_cast<txnouttype>(i));
|
|
||||||
}
|
}
|
||||||
return ret;
|
return Join(ret, ", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static UniValue decodescript(const JSONRPCRequest& request)
|
static UniValue decodescript(const JSONRPCRequest& request)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user