{"action":"created","issue":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/369","labels_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/369/comments","events_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/369/events","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/369","id":122797065,"number":369,"title":"Handle pushtx failures. Catch jsonrpcerror exception and retry for tu…","user":{"login":"AdamISZ","id":4278257,"avatar_url":"https://avatars.githubusercontent.com/u/4278257?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamISZ","html_url":"https://github.com/AdamISZ","followers_url":"https://api.github.com/users/AdamISZ/followers","following_url":"https://api.github.com/users/AdamISZ/following{/other_user}","gists_url":"https://api.github.com/users/AdamISZ/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamISZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamISZ/subscriptions","organizations_url":"https://api.github.com/users/AdamISZ/orgs","repos_url":"https://api.github.com/users/AdamISZ/repos","events_url":"https://api.github.com/users/AdamISZ/events{/privacy}","received_events_url":"https://api.github.com/users/AdamISZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-17T18:41:19Z","updated_at":"2015-12-18T12:01:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/pulls/369","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/369","diff_url":"https://github.com/JoinMarket-Org/joinmarket/pull/369.diff","patch_url":"https://github.com/JoinMarket-Org/joinmarket/pull/369.patch"},"body":"…mbler.\r\n\r\nNOT READY TO MERGE.\r\n\r\nPreviously, pushtx caught the JsonRpcConnectionError, but not the JsonRpcError, which is thrown when, for example, the transaction contains a spent utxo (this was the situation that some users mentioned, I also saw it myself). Crashing on this exception is no big deal in the case of a sendpayment run, because we've finished at that point anyway, but for tumbler, it makes more sense to simply retry the transaction again. To address this, caught the exception and printed the error code to the debug log.\r\n\r\nHowever, this is not ready to merge because there is something clunky about the tumbler restarting, that I'm not sure of the right way to deal with. See finish_callback edit: https://github.com/JoinMarket-Org/joinmarket/pull/369/files#diff-7dca4cc17829f93a2517b5a8dd3ef018L112\r\n\r\nThis doesn't seem right; add_tx_notify spins up a thread waiting for the walletnotify, and then pushtx() is called. We can restart the transaction if pushtx() fails, but this leaves the notify thread dangling (infinitely I think?). On the other hand, we (presumably?) cannot start the walletnotify thread *after* calling pushtx() because the unconfirm callback might get called too quicky? (I wasn't at all sure about this; if that's wrong, then that might be the right solution). As it is now, it could potentially keep creating new unwanted notify threads for transactions that were never pushed. Advice on the right way to do it?\r\n"},"comment":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/comments/165763811","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/369#issuecomment-165763811","issue_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/369","id":165763811,"user":{"login":"chris-belcher","id":8398185,"avatar_url":"https://avatars.githubusercontent.com/u/8398185?v=3","gravatar_id":"","url":"https://api.github.com/users/chris-belcher","html_url":"https://github.com/chris-belcher","followers_url":"https://api.github.com/users/chris-belcher/followers","following_url":"https://api.github.com/users/chris-belcher/following{/other_user}","gists_url":"https://api.github.com/users/chris-belcher/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-belcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-belcher/subscriptions","organizations_url":"https://api.github.com/users/chris-belcher/orgs","repos_url":"https://api.github.com/users/chris-belcher/repos","events_url":"https://api.github.com/users/chris-belcher/events{/privacy}","received_events_url":"https://api.github.com/users/chris-belcher/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T12:01:16Z","updated_at":"2015-12-18T12:01:16Z","body":"The notify thread (when using blockr.io) has timeouts and eventually gives up."}}