mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Optimize vInOutPoints insertion a bit
This commit is contained in:
parent
eecffe50ef
commit
e2b3fb349e
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue