Skip to content

Commit

Permalink
Add an option to allow users to disable relaying/mining data carrier …
Browse files Browse the repository at this point in the history
…transactions
  • Loading branch information
luke-jr committed Jun 26, 2014
1 parent 343feec commit e44fea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 2 additions & 1 deletion src/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit e44fea5

Please sign in to comment.