diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-26 17:31:03 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-26 17:31:12 +0200 |
commit | 236ae8665efadf7b4456c0a9fbf204a5cb4ce9f4 (patch) | |
tree | 7bdb5593dabb61f87322af48abc01caa465a93d6 /src | |
parent | eacff4a9c629e0c28e34b0f8ced790d2f7ded302 (diff) | |
parent | e44fea55ea73f46bc9460597c7001e77acb58db7 (diff) |
Merge pull request #3715
e44fea5 Add an option to allow users to disable relaying/mining data carrier transactions (Luke Dashjr)
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/script.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index a03629d07a..c7170b0f2d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -309,6 +309,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n"; strUsage += " -testnet " + _("Use the test network") + "\n"; + strUsage += "\n" + _("Node relay options:") + "\n"; + strUsage += " -datacarrier " + _("Relay and mine data carrier transactions (default: 1)") + "\n"; strUsage += "\n" + _("Block creation options:") + "\n"; strUsage += " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n"; strUsage += " -blockmaxsize=<n> " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n"; diff --git a/src/script.cpp b/src/script.cpp index c83d26885a..bc4705abe7 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1208,7 +1208,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG)); // Empty, provably prunable, data-carrying output - mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA)); + if (GetBoolArg("-datacarrier", true)) + mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA)); mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN)); } |