mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Declare SignatureHash() in script.h
This commit is contained in:
parent
c0e9548b63
commit
f5745fa52a
@ -809,6 +809,7 @@ bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int
|
|||||||
bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
|
bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
|
||||||
|
|
||||||
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
|
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
|
||||||
|
uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
|
||||||
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
|
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
|
||||||
int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
|
int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
|
||||||
bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
|
bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
|
||||||
|
@ -17,8 +17,6 @@ using namespace boost::assign;
|
|||||||
|
|
||||||
typedef vector<unsigned char> valtype;
|
typedef vector<unsigned char> valtype;
|
||||||
|
|
||||||
extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE(multisig_tests)
|
BOOST_AUTO_TEST_SUITE(multisig_tests)
|
||||||
|
|
||||||
CScript
|
CScript
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Test routines internal to script.cpp:
|
|
||||||
extern uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
|
|
||||||
|
|
||||||
// Helpers:
|
// Helpers:
|
||||||
static std::vector<unsigned char>
|
static std::vector<unsigned char>
|
||||||
Serialize(const CScript& s)
|
Serialize(const CScript& s)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "key.h"
|
#include "key.h"
|
||||||
#include "keystore.h"
|
#include "keystore.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "script.h"
|
||||||
#include "core_io.h"
|
#include "core_io.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -33,8 +34,6 @@ using namespace std;
|
|||||||
using namespace json_spirit;
|
using namespace json_spirit;
|
||||||
using namespace boost::algorithm;
|
using namespace boost::algorithm;
|
||||||
|
|
||||||
extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
|
|
||||||
|
|
||||||
static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
|
static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
|
||||||
|
|
||||||
Array
|
Array
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "serialize.h"
|
#include "serialize.h"
|
||||||
|
#include "script.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
@ -19,8 +20,6 @@
|
|||||||
using namespace json_spirit;
|
using namespace json_spirit;
|
||||||
extern Array read_json(const std::string& jsondata);
|
extern Array read_json(const std::string& jsondata);
|
||||||
|
|
||||||
extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
|
|
||||||
|
|
||||||
// Old script.cpp SignatureHash function
|
// Old script.cpp SignatureHash function
|
||||||
uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
|
uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user