Skip to content

Conversation

@tiagoicp
Copy link

No description provided.

@tiagoicp
Copy link
Author

Fixes Issue: #23

@tiagoicp
Copy link
Author

Opened an issue on Mops to better understand the desired new behaviour.
caffeinelabs/mops#195

@tiagoicp
Copy link
Author

Hi @tomijaga , think this is ready for review.

I have added specs that showcase it's allowing to be duplicated. The original problem is exposed on the issue (#23), and in short, because it's an intercanister call, you may have multiple transactions in Ledger while it waits for the callback that clears the SB (Stable Buffer - transactions).

So, this is an issue that typically arises in a peak transactions moment.

This fix was tested, it's not greedy, and tried for it to be fully compatible to any state of the archive. Example: that it already has duplicated txs, and therefore can't use total_txs - 1 to be the last_tx_index.

Demo of tests failing and passing:
Screenshot 2023-12-29 at 18 28 35
Screenshot 2023-12-29 at 18 28 54
Screenshot 2023-12-30 at 09 23 01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant