Skip to content

Commit e44fea5

Browse files
committed
Add an option to allow users to disable relaying/mining data carrier transactions
1 parent 343feec commit e44fea5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ std::string HelpMessage(HelpMessageMode mode)
309309
strUsage += " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n";
310310
strUsage += " -testnet " + _("Use the test network") + "\n";
311311

312+
strUsage += "\n" + _("Node relay options:") + "\n";
313+
strUsage += " -datacarrier " + _("Relay and mine data carrier transactions (default: 1)") + "\n";
312314
strUsage += "\n" + _("Block creation options:") + "\n";
313315
strUsage += " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n";
314316
strUsage += " -blockmaxsize=<n> " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";

src/script.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
12081208
mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG));
12091209

12101210
// Empty, provably prunable, data-carrying output
1211-
mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
1211+
if (GetBoolArg("-datacarrier", true))
1212+
mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
12121213
mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
12131214
}
12141215

0 commit comments

Comments
 (0)