Author: Mike Hearn 2013-10-27 14:32:57
Published on: 2013-10-27T14:32:57+00:00
In this context, the issue is related to bitcoinj getting a small but steady stream of bug reports regarding transactions not propagating. The library picks one peer to send the transaction to and then watches it propagate across the network. However, if that selected peer refuses the transaction, propagation never comes, and currently, there is no timeout to make it retry with a different node. The HTTP status code system is suggested as a solution to this problem. It gives a 3 digit numeric code that is machine-readable and a freeform text note for humans. This system works well because it does not need to account for every possible error, but it gives the other node the most useful information. Humans can puzzle out the meaning of the code, such as "403: values of txid gives rise to dom!" Enums or fixed length strings are not recommended because they make it harder to extend without any benefit. Finally, a link to the October Webinars on Code for Performance is provided.
Updated on: 2023-06-07T18:38:25.345729+00:00