what happens if a miner include a transaction already exists in another block?

0

Suppose that I have a Transaction A. (txA) I send my txA to bitcoin network and full node validate it and put in Mempool and starts to broadcasting it.

A Miner A connect to a fullnode to create a candidate block and wins the POW. In this block there is my txA

A miners B create another block with all different transactions except to my txA.

If block A and block B have the same previous block Hash it's a fork,and if the chain of block A wins, all transaction of block B return to mempool.

But if B Has the previous block hash of A ? After create a block there is another check of all transactions? When TxA is in mempool it's unconfirmed when become confirmed?

monkeyUser

Posted 2019-02-14T17:44:05.480

Reputation: 245

Answers

0

It can only exist in one block. That is why it is safer to wait for 2-6 confirmations before accepting a large transaction.

So to answer the title of your post - a miner can't include a transaction which exists on another block in the same chain since it would not be a valid block.

Zelgada

Posted 2019-02-14T17:44:05.480

Reputation: 56

thanks, who check these blocks for 2-6 confirmations?monkeyUser 2019-02-14T20:51:02.363

@monkeyUser: the anxious recipientRedGrittyBrick 2019-02-15T11:07:28.997

1@monkeyUser It's up to the person receiving the Bitcoin to check the number of confirmations. If you own a Lamborghini dealership an a customer pays with BTC, after 1 confirmation you let the customer drive off. The chain re-organizes and that BTC is no longer valid, and you don't have the money in your account. You should have waited for 6 confirmations before letting the customer drive off!Zelgada 2019-02-15T21:12:30.303