novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

exceptions in onCoinsReceived can result in loss of transaction(s) #389

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If an exception is thrown in a WalletEventListener.onCoinsReceived, 
transaction(s) go missing. I cannot currently tell its exactly the exceptions 
that are received with the listener.

If its of any use, I try to set up a testcase with wallet-tool.

Original issue reported on code.google.com by andreas....@gmail.com on 14 Apr 2013 at 9:04

GoogleCodeExporter commented 9 years ago
Another aspect of this: Will all other registered WalletEventListeners still be 
called? I would expect yes, especially since bitcoinj internally uses event 
listeners to keep consistency.

Original comment by andreas....@gmail.com on 15 Apr 2013 at 11:11

GoogleCodeExporter commented 9 years ago
One event listener throwing will prevent the rest from executing. You're right, 
we need to do a thorough scrub for exception safety. It isn't worth trying to 
fix this properly until the transaction confidence listeners are changed to run 
at the end of all operations, because an exception thrown from them could cause 
arbitrary corruption right now.

Original comment by hearn@google.com on 15 Apr 2013 at 11:16

GoogleCodeExporter commented 9 years ago
You said this will be fixed with the latest changes on event-thread, will it?

Original comment by andreas....@gmail.com on 2 Jul 2013 at 7:39

GoogleCodeExporter commented 9 years ago
It should do yes, unless you override the default executor with 
Threading.SAME_THREAD (don't do that).

Original comment by hearn@google.com on 2 Jul 2013 at 7:59

GoogleCodeExporter commented 9 years ago

Original comment by hearn@google.com on 11 Jul 2013 at 1:00