aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c8af01983c..6e19123a41 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1133,9 +1133,8 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe
set<COutPoint> vInOutPoints;
for (const auto& txin : tx.vin)
{
- if (vInOutPoints.count(txin.prevout))
+ if (!vInOutPoints.insert(txin.prevout).second)
return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-duplicate");
- vInOutPoints.insert(txin.prevout);
}
}