3
Assume I'm using the original client to receive payments. Is the following scenario possible?
My wallet gets notified of unconfirmed transaction with id 12 in which one of the outputs is an address that belongs to me.
Someone changes the id of the transaction to 13 and relays it to the miner who finds the next block.
My wallet gets notified of block that contains transaction with id 13 in which one of the outputs is an address that belongs to me.
Transaction with id 13 gets 6 confirmations but transaction with 12 gets stuck in my wallet as an unconfirmed transaction.
If I'm showing my customers their unconfirmed transactions, then the customer will see a confirmed transaction with id 13 and an unconfirmed transaction with id 12. Is that correct? Or will QT automatically delete the first transaction?
What can I do to prevent this?
I think your Bitcoin-Qt would discard its knowledge of t12 as soon as t13 gets confirmed as they are doublespends of each other. – Murch – 2014-02-17T19:11:42.167
1Thanks. Can you point me to a certain part of the source code where I can check to make sure? – Emre Kenci – 2014-02-17T19:54:13.453
2
@AntonAnsgar Here is where stale transaction removal happens.
– John T – 2014-02-17T21:33:43.760removeConflictschecks memory pool for conflicting inputs here.@JacobTorba Can you write an answer so I can mark as valid? Thank you. – Emre Kenci – 2014-02-18T07:06:47.013
@AntonAnsgar you got it. – John T – 2014-02-18T15:54:47.907