diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-07-18 23:23:41 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-07-18 23:29:50 +0200 |
commit | ff1fe669d41814a4e0406243d1c081725006a735 (patch) | |
tree | 7da8f1b73c21f01ecb9ada221bf1e0ba703de892 /src/main.cpp | |
parent | b9345f7d1c071fbbef75d79ac6a2ca8636c599e9 (diff) | |
parent | 3da434a2ef9ac76a0ad4a33921773a9ac8f10ab7 (diff) | |
download | bitcoin-ff1fe669d41814a4e0406243d1c081725006a735.tar.xz |
Merge pull request #3939
3da434a Introduce option to disable relay/mining of bare multisig scripts in TX outputs (Jeff Garzik)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
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; } |