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

Refactor replication validation #1559

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Sep 11, 2024

Description

Refactor PendingTransactionValidation to expose public function that are now called by ValidationContext.
Functions can now be simply unit tested

Avoid code duplication by using ValidationContext during replication validation in TransactionValidator

Also verify PendingTransactionValidation during replication validation

Refactor LedgerOperations to use a more friendly struct and reduce code duplication

Also split LedgerOperations calculation in a new module LedgerValidation and let only the ValidationStamp LedgerOperations for serialization

Fixes #907

Checklist:

  • My code follows the style guidelines of 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 made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added quality Improve code quality enhancements labels Sep 11, 2024
@Neylix Neylix merged commit 9c6ee55 into archethic-foundation:develop Oct 2, 2024
2 checks passed
@Neylix Neylix deleted the refactor-replication-validation branch October 2, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements quality Improve code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pending validation control on replication nodes
3 participants