Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 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 <script/script.h> | #include <script/script.h> | ||||
#include <script/script_flags.h> | #include <script/script_flags.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <string> | |||||
const char *GetOpName(opcodetype opcode) { | std::string GetOpName(opcodetype opcode) { | ||||
switch (opcode) { | switch (opcode) { | ||||
// push value | // push value | ||||
case OP_0: | case OP_0: | ||||
return "0"; | return "0"; | ||||
case OP_PUSHDATA1: | case OP_PUSHDATA1: | ||||
return "OP_PUSHDATA1"; | return "OP_PUSHDATA1"; | ||||
case OP_PUSHDATA2: | case OP_PUSHDATA2: | ||||
return "OP_PUSHDATA2"; | return "OP_PUSHDATA2"; | ||||
▲ Show 20 Lines • Show All 490 Lines • Show Last 20 Lines |