aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2014-07-16 20:04:04 -0400
committerJeff Garzik <jgarzik@bitpay.com>2014-07-18 10:16:47 -0400
commit3da434a2ef9ac76a0ad4a33921773a9ac8f10ab7 (patch)
tree960172cd0f5575e45f00134a5a438ba898146641 /src/main.cpp
parent40d2d6922318957f1784dda735f24690baca027c (diff)
downloadbitcoin-3da434a2ef9ac76a0ad4a33921773a9ac8f10ab7.tar.xz
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.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 766f0970f0..dd9e76378e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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;
}