fix: randomly missing activities
Summary
currently we check if txA is async and txB has txA as an input, we say txB is the claiming tx of txA. if (txA === ASYNC && txB.inputs.contain(txA))
Now finally i could randomly reproduce the bug mentioned in the discord.
The error is following: we get an async output from txA, therefore we classify txA as async. But txA also contains a remainder which is not async. When the sender then creates a new txB which contains the remainder of txA, we as the receiver see again the above case: txB which has as an input txA (which is async for the view of the receiver).
The solution is that only outgoing transactions can be used as claiming transactions. if (txA === ASYNC && txB === OUTGOING && txB.inputs.contain(txA)).
Changelog
- fix wrongly linked activities
Relevant Issues
Closes #4655
Testing
Platforms
Please select any platforms where your changes have been tested.
-
Desktop
- [ ] MacOS
- [ ] Linux
- [ ] Windows
-
Mobile
- [ ] iOS
- [ ] Android
Instructions
Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.
...
Checklist
Please tick all of the following boxes that are relevant to your changes.
- [ ] I have followed the contribution guidelines for this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or modified tests that prove my changes work as intended
- [ ] I have verified that new and existing unit tests pass locally with my changes
- [ ] I have verified that my latest changes pass CI workflows for testing and linting
- [ ] I have made corresponding changes to the documentation