Question: What happens when a transaction is included in more than one block?
Don't break the forum rules,and no PLAGIARIZING!
I try to reply because i saw inaccurate answers. We are talking about the same transaction still not confirmed. In this case is possible that miner A and B include this transaction in 2 different blocks (one made by A and the other made by B). Then miner A proposes his block to node i and miner B does the same with node j. In this case there will be other miners which will consider the "previous block hash" that of i and other that of j. So other miners like C,D will mine after A-block and miners F,G will mine after B-block. This story will end as soon as most miners (and therefore the greater quantity of hashing power) will continue the story from i (or j) and the other story will be rejected by nodes, so this is reduced by the common sentence "the longest chain wins". If we are talking about the same transaction but in 2 different period it has no sense because the inputs used in the second transaction (which would be the same of the first) are "empty" because they have already spent so it is necessary changing inputs, changing hash, changing transaction.