mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-02 10:35:22 -05:00
6694e4f4e0
We subscribe to transactions upon broadcast, where we use output index `0` for the subscription. In order to ensure that this subscription is guaranteed to be for the locking script (and not a change output) we now ensure that the locking script output is always at index `0` of the outputs of the transaction. We chose this solution because otherwise we would have to add more information to broadcasting a transaction. This solution is less intrusive, because the order of transaction outputs should not have any side effects and ensuring index `0` makes the whole behaviour more deterministic.