mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user