Introduce option to disable relay/mining of bare multisig scripts in TX outputs

First and foremost, this defaults to OFF.

This option lets a node consider such transactions non-standard,
meaning they will not be relayed or mined by default, but other miners
are free to mine these as usual.
This commit is contained in:
Jeff Garzik
2014-07-16 20:04:04 -04:00
parent 40d2d69223
commit 3da434a2ef
3 changed files with 12 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ bool fImporting = false;
bool fReindex = false;
bool fBenchmark = false;
bool fTxIndex = false;
bool fIsBareMultisigStd = true;
unsigned int nCoinCacheSize = 5000;
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
@@ -604,9 +605,13 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
reason = "scriptpubkey";
return false;
}
if (whichType == TX_NULL_DATA)
nDataOut++;
else if (txout.IsDust(::minRelayTxFee)) {
else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
reason = "bare-multisig";
return false;
} else if (txout.IsDust(::minRelayTxFee)) {
reason = "dust";
return false;
}