1
Imagine a malminer with two important abilities: having enough hashrate for producing blocks in a single-miner mode in reasonable amount of time and having a malconfigured miner software which doing somewhat a usual mining job, but forces some malminer's coins to be spend twice instead of processing only first transaction. What will next miner do if he will get the misledgered block with all others conditions satisfying (correct coin owner's signature, enough proof-of-bruteforse zeroes in checksum, 6 trailing blocks without double-spending, etc)? If the attack is not possible, I want to look at the code behind such a protection.
Also, this is the code where the blocks are checked for double-spends: https://github.com/bitcoin/bitcoin/blob/c1c671feb163c2b3baa2caf97b05a997187e55d5/src/validation.cpp#L1790
– Nick ODell – 2017-08-08T23:35:36.267