2
What happens with a valid block which contains a transaction which was already included in previous blocks? Is such a block accepted by other nodes in the network or discarded?
2
What happens with a valid block which contains a transaction which was already included in previous blocks? Is such a block accepted by other nodes in the network or discarded?
2
The second time the transaction appears in a block the outputs it claims are already marked as claimed, hence the transaction, seen a second time, would be invalid. By definition the block is only valid if all transactions in it are valid.
The only way of a transaction landing in two potentially valid blocks is during a blockchain fork, where the two competing blockchain heads both include the transaction.
If a miner were to include an already confirmed transaction it would invalidate the block, and he would lose its reward. Notice that this also avoids having a miner claim fees multiple times, which would effectively create new coins from thin air.