aboutsummaryrefslogtreecommitdiff
path: root/src/script/standard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/standard.cpp')
-rw-r--r--src/script/standard.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 05938961bc..ab6e6cde0d 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -5,6 +5,7 @@
#include "script/standard.h"
+#include "pubkey.h"
#include "script/script.h"
#include "util.h"
#include "utilstrencodings.h"
@@ -15,6 +16,8 @@ using namespace std;
typedef vector<unsigned char> valtype;
+unsigned nMaxDatacarrierBytes = MAX_OP_RETURN_RELAY;
+
CScriptID::CScriptID(const CScript& in) : uint160(in.size() ? Hash160(in.begin(), in.end()) : 0) {}
const char* GetTxnOutputType(txnouttype t)
@@ -31,9 +34,9 @@ const char* GetTxnOutputType(txnouttype t)
return NULL;
}
-//
-// Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
-//
+/**
+ * Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
+ */
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsigned char> >& vSolutionsRet)
{
// Templates
@@ -139,8 +142,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
}
else if (opcode2 == OP_SMALLDATA)
{
- // small pushdata, <= MAX_OP_RETURN_RELAY bytes
- if (vch1.size() > MAX_OP_RETURN_RELAY)
+ // small pushdata, <= nMaxDatacarrierBytes
+ if (vch1.size() > nMaxDatacarrierBytes)
break;
}
else if (opcode1 != opcode2 || vch1 != vch2)