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:26:36 +0000 (18:26 +0100)
commita206b0ea12eb4606b93323268fc81a4f1f952531
tree9691c6cfc013c7efb7692502a5f43b283ba6e42a
parent50abb5516da51fc518fe363bd445afbab70c71ec
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