Changeset View
Changeset View
Standalone View
Standalone View
src/outputtype.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2017 The Bitcoin Core developers | // Copyright (c) 2009-2017 The Bitcoin Core 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 <outputtype.h> | #include <outputtype.h> | ||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <script/script.h> | #include <script/script.h> | ||||
#include <script/sign.h> | #include <script/sign.h> | ||||
#include <util/vector.h> | #include <util/vector.h> | ||||
#include <cassert> | #include <cassert> | ||||
static const std::string OUTPUT_TYPE_STRING_LEGACY = "legacy"; | static const std::string OUTPUT_TYPE_STRING_LEGACY = "legacy"; | ||||
const std::array<OutputType, 1> OUTPUT_TYPES = {{OutputType::LEGACY}}; | |||||
bool ParseOutputType(const std::string &type, OutputType &output_type) { | bool ParseOutputType(const std::string &type, OutputType &output_type) { | ||||
if (type == OUTPUT_TYPE_STRING_LEGACY) { | if (type == OUTPUT_TYPE_STRING_LEGACY) { | ||||
output_type = OutputType::LEGACY; | output_type = OutputType::LEGACY; | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
Show All 39 Lines |