Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and remove recursive transaction usage #4559

Merged

Conversation

clemahieu
Copy link
Contributor

Recursive transactions are generally unnecessary and will deadlock when mutually exclusive memory protection is needed/added to ledger transactions.

Use enclosing transaction within scheduler::optimistic::run_one rather than opening a new one. This seems like a typo since the existing transaction is readily available.

In the epoch upgrade algorithm, the receivable_iterator was not incremented so the transaction stored in the iterator was not used. The outer loop already re-opens the transaction to get an up-to-date view of the ledger so I didn't identify any necessity for the algorithm to have a consistent ledger view as it's running.

Recursive transactions are unnecessary and will deadlock when memory protection is needed/added to ledger transactions.
…d recursive transaction opening.

In this algorithm the receivable_iterator was not incremented so the stored transaction was not used.
The outer loop already re-opens the transaction in order to get an up-to-date view of the ledger.
@clemahieu clemahieu merged commit 6fa57aa into nanocurrency:develop Apr 14, 2024
23 of 26 checks passed
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.

2 participants