walletnotify and transaction malleability

4

To monitor inbound payments for a web wallet, I plan to use walletnotify to record the transaction IDs, then on each blocknotify I will check the number of confirmations for each pending transaction.

Obviously everyone is thinking about transaction malleability right now, so my question is this: in the event that the transaction ID is changed, or a block containing the transaction is orphaned etc - will I get another walletnotify with the changed TxId?

Avram

Posted 2014-03-14T13:32:21.913

Reputation: 1 629

Answers

3

Yes. You receieve a walletnotify for every transaction your wallet sees that is relevant to it. Once when it is first seen, and once when it is seen in a block (first confirmation). These two may coincide, in which case you only get the confirmation one.

For mutated transactions, you will see a first one that never confirms (and in 0.9 will get a "-1" confirmations marker), and a second transaction that does confirm.

Pieter Wuille

Posted 2014-03-14T13:32:21.913

Reputation: 54 032