mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
Use block times for 'hard' OP_EVAL switchover, and refactored EvalScript
so it takes a flag for how to interpret OP_EVAL. Also increased IsStandard size of scriptSigs to 500 bytes, so a 3-of-3 multisig transaction IsStandard.
This commit is contained in:
14
src/script.h
14
src/script.h
@@ -6,7 +6,6 @@
|
||||
#define H_BITCOIN_SCRIPT
|
||||
|
||||
#include "base58.h"
|
||||
#include "keystore.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -14,6 +13,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
class CTransaction;
|
||||
class CKeyStore;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -24,7 +24,7 @@ enum
|
||||
};
|
||||
|
||||
|
||||
enum txntype
|
||||
enum txnouttype
|
||||
{
|
||||
TX_NONSTANDARD,
|
||||
// 'standard' transaction types:
|
||||
@@ -34,7 +34,7 @@ enum txntype
|
||||
TX_MULTISIG,
|
||||
};
|
||||
|
||||
const char* GetTxnTypeName(txntype t);
|
||||
const char* GetTxnOutputType(txnouttype t);
|
||||
|
||||
enum opcodetype
|
||||
{
|
||||
@@ -567,14 +567,14 @@ public:
|
||||
|
||||
|
||||
|
||||
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType, int& nSigOpCountRet);
|
||||
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType, bool fStrictOpEval, int& nSigOpCountRet);
|
||||
|
||||
bool Solver(const CScript& scriptPubKey, txntype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
|
||||
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
|
||||
bool IsStandard(const CScript& scriptPubKey);
|
||||
bool IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
|
||||
bool ExtractAddress(const CScript& scriptPubKey, const CKeyStore* pkeystore, CBitcoinAddress& addressRet);
|
||||
bool ExtractAddresses(const CScript& scriptPubKey, const CKeyStore* pkeystore, txntype& typeRet, std::vector<CBitcoinAddress>& addressRet, int& nRequiredRet);
|
||||
bool ExtractAddresses(const CScript& scriptPubKey, const CKeyStore* pkeystore, txnouttype& typeRet, std::vector<CBitcoinAddress>& addressRet, int& nRequiredRet);
|
||||
bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL, CScript scriptPrereq=CScript());
|
||||
bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, int& nSigOpCountRet, int nHashType=0);
|
||||
bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, int& nSigOpCountRet, int nHashType=0, bool fStrictOpEval=true);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user