aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/standard.cpp6
-rw-r--r--src/script/standard.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 05938961bc..7356e541a6 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -15,6 +15,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)
@@ -139,8 +141,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)
diff --git a/src/script/standard.h b/src/script/standard.h
index 961b214c89..d795121e3c 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -26,6 +26,7 @@ public:
};
static const unsigned int MAX_OP_RETURN_RELAY = 40; // bytes
+extern unsigned nMaxDatacarrierBytes;
// Mandatory script verification flags that all new blocks must comply with for
// them to be valid. (but old blocks may not comply with) Currently just P2SH,