Any projects which want to use Hush code from now on will need to be licensed as GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/ Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull in changes from the Hush Full Node without permission from The Hush Developers, which may in some circumstances grant an MIT license on a case-by-case basis.
93 lines
4.5 KiB
C++
93 lines
4.5 KiB
C++
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
|
// Distributed under the GPLv3 software license, see the accompanying
|
|
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
|
|
/******************************************************************************
|
|
* Copyright © 2014-2019 The SuperNET Developers. *
|
|
* *
|
|
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
|
|
* the top-level directory of this distribution for the individual copyright *
|
|
* holder information and the developer policies on copyright and licensing. *
|
|
* *
|
|
* Unless otherwise agreed in a custom licensing agreement, no part of the *
|
|
* SuperNET software, including this file may be copied, modified, propagated *
|
|
* or distributed except according to the terms contained in the LICENSE file *
|
|
* *
|
|
* Removal or modification of this copyright notice is prohibited. *
|
|
* *
|
|
******************************************************************************/
|
|
|
|
#include "script_error.h"
|
|
|
|
const char* ScriptErrorString(const ScriptError serror)
|
|
{
|
|
switch (serror)
|
|
{
|
|
case SCRIPT_ERR_OK:
|
|
return "No error";
|
|
case SCRIPT_ERR_EVAL_FALSE:
|
|
return "Script evaluated without error but finished with a false/empty top stack element";
|
|
case SCRIPT_ERR_VERIFY:
|
|
return "Script failed an OP_VERIFY operation";
|
|
case SCRIPT_ERR_EQUALVERIFY:
|
|
return "Script failed an OP_EQUALVERIFY operation";
|
|
case SCRIPT_ERR_CHECKMULTISIGVERIFY:
|
|
return "Script failed an OP_CHECKMULTISIGVERIFY operation";
|
|
case SCRIPT_ERR_CHECKSIGVERIFY:
|
|
return "Script failed an OP_CHECKSIGVERIFY operation";
|
|
case SCRIPT_ERR_NUMEQUALVERIFY:
|
|
return "Script failed an OP_NUMEQUALVERIFY operation";
|
|
case SCRIPT_ERR_SCRIPT_SIZE:
|
|
return "Script is too big";
|
|
case SCRIPT_ERR_PUSH_SIZE:
|
|
return "Push value size limit exceeded";
|
|
case SCRIPT_ERR_OP_COUNT:
|
|
return "Operation limit exceeded";
|
|
case SCRIPT_ERR_STACK_SIZE:
|
|
return "Stack size limit exceeded";
|
|
case SCRIPT_ERR_SIG_COUNT:
|
|
return "Signature count negative or greater than pubkey count";
|
|
case SCRIPT_ERR_PUBKEY_COUNT:
|
|
return "Pubkey count negative or limit exceeded";
|
|
case SCRIPT_ERR_BAD_OPCODE:
|
|
return "Opcode missing or not understood";
|
|
case SCRIPT_ERR_DISABLED_OPCODE:
|
|
return "Attempted to use a disabled opcode";
|
|
case SCRIPT_ERR_INVALID_STACK_OPERATION:
|
|
return "Operation not valid with the current stack size";
|
|
case SCRIPT_ERR_INVALID_ALTSTACK_OPERATION:
|
|
return "Operation not valid with the current altstack size";
|
|
case SCRIPT_ERR_OP_RETURN:
|
|
return "OP_RETURN was encountered";
|
|
case SCRIPT_ERR_UNBALANCED_CONDITIONAL:
|
|
return "Invalid OP_IF construction";
|
|
case SCRIPT_ERR_NEGATIVE_LOCKTIME:
|
|
return "Negative locktime";
|
|
case SCRIPT_ERR_UNSATISFIED_LOCKTIME:
|
|
return "Locktime requirement not satisfied";
|
|
case SCRIPT_ERR_SIG_HASHTYPE:
|
|
return "Signature hash type missing or not understood";
|
|
case SCRIPT_ERR_SIG_DER:
|
|
return "Non-canonical DER signature";
|
|
case SCRIPT_ERR_MINIMALDATA:
|
|
return "Data push larger than necessary";
|
|
case SCRIPT_ERR_SIG_PUSHONLY:
|
|
return "Only non-push operators allowed in signatures";
|
|
case SCRIPT_ERR_SIG_HIGH_S:
|
|
return "Non-canonical signature: S value is unnecessarily high";
|
|
case SCRIPT_ERR_SIG_NULLDUMMY:
|
|
return "Dummy CHECKMULTISIG argument must be zero";
|
|
case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS:
|
|
return "NOPx reserved for soft-fork upgrades";
|
|
case SCRIPT_ERR_PUBKEYTYPE:
|
|
return "Public key is neither compressed or uncompressed";
|
|
case SCRIPT_ERR_CRYPTOCONDITION_INVALID_FULFILLMENT:
|
|
return "Crypto-Condition payload is invalid";
|
|
case SCRIPT_ERR_UNKNOWN_ERROR:
|
|
case SCRIPT_ERR_ERROR_COUNT:
|
|
default: break;
|
|
}
|
|
return "unknown error";
|
|
}
|