Do not allow overwriting unspent transactions (BIP 30)
authorPieter Wuille <pieter.wuille@gmail.com>
Fri, 17 Feb 2012 16:58:02 +0000 (17:58 +0100)
committerPieter Wuille <pieter.wuille@gmail.com>
Sat, 3 Mar 2012 17:51:18 +0000 (18:51 +0100)
commitd7962747c4bfe90f9991d121fd22ac625ae2de30
tree18851ed09f60722552e0a3a5cce31121210966a2
parentc7eb151ad0ed441d6fd598551059a9bbfb09e99e
Do not allow overwriting unspent transactions (BIP 30)

Introduce the following network rule:
 * a block is not valid if it contains a transaction whose hash
   already exists in the block chain, unless all that transaction's
   outputs were already spent before said block.

Warning: this is effectively a network rule change, with potential
risk for forking the block chain. Leaving this unfixed carries the
same risk however, for attackers that can cause a reorganisation
in part of the network.

Thanks to Russell O'Connor and Ben Reeves.
src/main.cpp