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 TransactionChain module #1057

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented May 31, 2023

Description

This issue aims to refactor the module TransactionChain to have a more consistent approach to get data from local DB or in remote.

Some functions have a prefix with a specific meaning:

  • list -> request not related to a specific chain
  • get -> get data from DB
  • fetch -> if data is immuable, first get data from DB, if not present request it on the network
    if data evolve over time, always request it on the network

For the review I advise you to read commit by commit as they all have a specific change and they normally works alone.

This also Fixes #1051

How Has This Been Tested?

Updated Unit tests to match the new functions name
Runned multiple node with benchmarks

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 May 31, 2023
@Neylix Neylix added this to the 1.2.0 milestone May 31, 2023
@Neylix Neylix force-pushed the refactor-transaction-chain branch from 5ab86a5 to f60253f Compare May 31, 2023 17:03
@apoorv-2204
Copy link
Contributor

👍

@samuelmanzanera samuelmanzanera merged commit 61da159 into archethic-foundation:develop Jun 5, 2023
@Neylix Neylix deleted the refactor-transaction-chain branch June 7, 2023 08:39
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.

Search transaction should not prioritize invalid tx locally
4 participants