Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
With Core 19, BIP61 was removed. This feature would send messages back to DashJ telling it why a transaction was rejected, for instance. This PR will simulate a BIP61 reject message internally so that DashJ clients can report some of these transaction errors to the users.
A workaround for Dash Core 0.14 was removed that would help us with sending transactions. There was a problem with 0.14 where a DashJ client was being disconnected as soon as it connected. This is a problem for DashJ clients, which may not be connected to the Dash Network at the time of sending a transaction. In such a case, DashJ first makes connections and then would immediately send the TX. However, the Dash Core 0.14 bug would kick DashJ clients off before sending could take place. Our temp fix was to keep sending the TX until there were no disconnect errors (or until 9 attempts to send were made).
This 9 retry is a problem if DashJ is sending an invalid transaction (double spend) because it will keep trying 9 times and then be banned by 9 * 3 or more nodes which can result in sync issues. With the removal of BIP61, we don't know why were are disconnected when sending. Therefore it was decided to remove this 9 retry code.
Lastly, the resend if only sent to one node was removed. Sending twice to the same node is not useful. By default on mainnet and testnet. If Only one node is connected, then DashJ will send the TX and then disconnect from that node and attempt reconnect to determine if the TX was received.
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only