Check for duplicate txins in CheckTransaction. #443
pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:dupin changing 1 files +9 −0-
TheBlueMatt commented at 12:20 pm on July 31, 2011: memberThese should be invalid.
-
Check for duplicate txins in CheckTransaction. 33208fb557
-
groffer commented at 10:03 pm on August 2, 2011: noneCheckBlock calls this function. Won’t this cause a fork in the blockchain if the network doesn’t upgrade as a whole and a transaction that runs afoul of this check is included in a block?
-
sipa commented at 10:07 pm on August 2, 2011: memberSuch a transaction should already cause the block it is included in to be invalid, as ConnectInputs will detect the duplicate use of the same prevout. This patch just causes such cases to be detected in an earlier stage, before it enters the memory pool.
-
TheBlueMatt commented at 10:12 pm on August 2, 2011: memberIf a transaction with a duplicate input is in a block, the chain should be forked (or people are making money out of nothing). Also, no transactions with duplicate inputs get put in blocks…someone tried it a couple weeks ago, but the txes never ended up in blocks. Im assuming there is a check somewhere later on that prevented them from getting added to a block, though I haven’t done any digging on the matter. This is really to prevent such obviously invalid transactions from getting relayed.
-
groffer commented at 10:19 pm on August 2, 2011: noneRight, looks like the vSpent check in ConnectInputs takes care of it.
-
gavinandresen referenced this in commit 4e5d88ce26 on Aug 8, 2011
-
gavinandresen merged this on Aug 8, 2011
-
gavinandresen closed this on Aug 8, 2011
-
dexX7 referenced this in commit c637a27dd7 on Jan 9, 2017
-
ptschip referenced this in commit fd9ccdef13 on Apr 19, 2017
-
kallewoof referenced this in commit e63e500658 on Oct 4, 2019
-
rajarshimaitra referenced this in commit 2d076f1420 on Aug 5, 2021
-
DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 09:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me