diff options
| author | Matt Corallo <[email protected]> | 2016-11-09 11:28:41 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-11-09 11:28:41 -0800 |
| commit | e2b3fb349ed99f05ea518c7eb260db606350a2b5 (patch) | |
| tree | f1056f999f20b79aa8277fa41c65595966e48e18 /src/main.cpp | |
| parent | Remove redundant duplicate-input check from CheckTransaction (diff) | |
| download | discoin-e2b3fb349ed99f05ea518c7eb260db606350a2b5.tar.xz discoin-e2b3fb349ed99f05ea518c7eb260db606350a2b5.zip | |
Optimize vInOutPoints insertion a bit
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index c8af01983..6e19123a4 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); } } |