aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/policy/policy.cpp')
-rw-r--r--src/policy/policy.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index 169fef4af4..4c96fbf5a5 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -49,7 +49,9 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
return false;
if (m < 1 || m > n)
return false;
- }
+ } else if (whichType == TX_NULL_DATA &&
+ (!GetBoolArg("-datacarrier", true) || scriptPubKey.size() > nMaxDatacarrierBytes))
+ return false;
return whichType != TX_NONSTANDARD;
}