Closed pawellewandowski98 closed 2 months ago
Isn't this a BroadcastFailure
?
It is not, at least not in the way Arc processes transactions. Arc accepts that transaction and keeps track of it, because nodes may accept that transaction into mempool and Arc wants to see which one of the competing transactions will ultimately become MINED
and which one(s) will become REJECTED
and update the status accordingly.
In most cases, it will obviously be the one seen first by the nodes, but in case two transactions (spending the same UTXO) get accepted by different nodes at exactly the same time, it's up to the nodes to decide.
A broadcast error happens when there is something wrong with the transaction (or broadcast) itself and the nodes will not accept it.
Description of Changes
Added
competingTxs
toBroadcastResponse
, they are sent if double spend was attempted.Linked Issues / Tickets
ARCO-142
Testing Procedure
Describe the tests you've added or any testing steps you've taken.
Checklist:
CHANGELOG.md
with my changesnpm run doc
andnpm run lint
one final time before requesting a reviewnpm version patch
so that my changes will trigger a new version to be released when they are merged