From c12b2a3ae68289d0e8b671a92555ce89eb67e010 Mon Sep 17 00:00:00 2001 From: Mithril Man Date: Fri, 31 Jul 2020 01:47:17 +0200 Subject: [PATCH] fixes #197 --- .../Rules/CommonRules/CheckPowTransactionRule.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Features/Blockcore.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs b/src/Features/Blockcore.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs index e72a37df0..5cc444ec4 100644 --- a/src/Features/Blockcore.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs +++ b/src/Features/Blockcore.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs @@ -86,13 +86,11 @@ public virtual void CheckTransaction(Network network, ConsensusOptions options, var inOutPoints = new HashSet(); foreach (TxIn txin in tx.Inputs) { - if (inOutPoints.Contains(txin.PrevOut)) + if (!inOutPoints.Add(txin.PrevOut)) { this.Logger.LogTrace("(-)[TX_DUP_INPUTS]"); ConsensusErrors.BadTransactionDuplicateInputs.Throw(); } - - inOutPoints.Add(txin.PrevOut); } if (tx.IsCoinBase)