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

SVM: Group transaction processing configs #1475

Merged
merged 1 commit into from
May 24, 2024

Conversation

buffalojoec
Copy link

@buffalojoec buffalojoec commented May 23, 2024

Problem

The SVM's transaction processing functions - load_and_execute_sanitized_transactions
and execute_loaded_transaction - are quickly becoming overloaded with inputs.

Since many of these inputs are optional configurations to customize transaction
processing behavior, it makes sense to group these together, in a type that implements
Default, and require only a reference to said type to process transactions.

This would make integrating the transaction processor's API with a set of configs much
more idiomatic.

Summary of Changes

Group all optional configurations for processing transactions into a new configuration
object: TransactionProcessingConfig and require a reference to this object in the
SVM API.

Adiós #[allow(clippy::too_many_arguments)]!

@buffalojoec buffalojoec force-pushed the svm-processing-config branch from b5810b2 to 5782412 Compare May 23, 2024 22:33
@buffalojoec buffalojoec marked this pull request as ready for review May 23, 2024 22:35
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.7%. Comparing base (cd7710b) to head (5782412).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #1475     +/-   ##
=========================================
- Coverage    82.7%    82.7%   -0.1%     
=========================================
  Files         876      876             
  Lines      371245   371244      -1     
=========================================
- Hits       307360   307324     -36     
- Misses      63885    63920     +35     

@buffalojoec buffalojoec merged commit 529e73d into anza-xyz:master May 24, 2024
41 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.

3 participants