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

Tweak/improve core api substate version mapping #968

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dhedey
Copy link
Contributor

@dhedey dhedey commented Jun 5, 2024

Summary

Small improvements to #946

Details

  • The as-performant-as-before version macro _single_versioned! now makes use of the .as_unique_version() method for single-versioned types which is only available on substates with a single version - else it gives a compiler error.
  • If you have a multi-versioned substate, you can use an alternative ..._multi_versioned! macro. This only updates to the latest if the substate isn't already the latest, as a little perf optimisation.

Testing

Automated tests still pass. Clippy via ./gradlew spotlessApply now passes without warnings.

Improve performance when mapping substates
Improves on #946
Copy link

github-actions bot commented Jun 5, 2024

Docker tags
docker.io/radixdlt/private-babylon-node:pr-968
docker.io/radixdlt/private-babylon-node:6a1ae6c06f
docker.io/radixdlt/private-babylon-node:sha-6a1ae6c

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 59 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@b6bdff8). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             develop    #968   +/-   ##
=========================================
  Coverage           ?   42.8%           
  Complexity         ?    4300           
=========================================
  Files              ?    1693           
  Lines              ?   52087           
  Branches           ?    1490           
=========================================
  Hits               ?   22294           
  Misses             ?   29324           
  Partials           ?     469           
Flag Coverage Δ
rust 42.8% <0.0%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ore_api/conversions/substates/access_controller.rs 0.0% <0.0%> (ø)
...c/core_api/conversions/substates/account_locker.rs 0.0% <0.0%> (ø)
.../core_api/conversions/substates/metadata_module.rs 0.0% <0.0%> (ø)
...e_api/conversions/substates/access_rules_module.rs 0.0% <0.0%> (ø)
...c/core_api/conversions/substates/royalty_module.rs 0.0% <0.0%> (ø)
...server/src/core_api/conversions/substates/pools.rs 0.0% <0.0%> (ø)
...rver/src/core_api/conversions/substates/account.rs 0.0% <0.0%> (ø)
...rver/src/core_api/conversions/substates/package.rs 0.0% <0.0%> (ø)
...ver/src/core_api/conversions/substates/resource.rs 0.0% <0.0%> (ø)
...ore_api/conversions/substates/consensus_manager.rs 0.0% <0.0%> (ø)
... and 1 more

Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

None yet

2 participants