Skip to content

refactor(settings): more settings injection refactors#1085

Merged
glevco merged 1 commit intomasterfrom
refactor/settings-injection
Jul 16, 2024
Merged

refactor(settings): more settings injection refactors#1085
glevco merged 1 commit intomasterfrom
refactor/settings-injection

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Jul 15, 2024

Motivation

Continue refactoring HathorSettings usages to use an injected instance rather than global.

Acceptance Criteria

  • Updated to use injected settings:
    • BaseIndex, MemoryIndexesManager, and MemoryHeightIndex.
    • BaseTransaction and all its subclasses, and TransactionMetadata.
    • get_deposit_amount() and get_withdraw_amount() functions.
  • Updated TransactionStorage to inject its settings into constructed genesis.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Jul 15, 2024
@glevco glevco force-pushed the refactor/settings-injection branch from 94ccef5 to a234b36 Compare July 15, 2024 19:25
@glevco glevco marked this pull request as ready for review July 15, 2024 19:26
@glevco glevco requested review from jansegre and msbrogli as code owners July 15, 2024 19:26
@codecov
Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.68%. Comparing base (5a788d0) to head (a234b36).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1085   +/-   ##
=======================================
  Coverage   84.68%   84.68%           
=======================================
  Files         308      308           
  Lines       23295    23303    +8     
  Branches     3518     3518           
=======================================
+ Hits        19727    19734    +7     
- Misses       2863     2865    +2     
+ Partials      705      704    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glevco glevco merged commit aaf959c into master Jul 16, 2024
@glevco glevco deleted the refactor/settings-injection branch July 16, 2024 21:58
This was referenced Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants