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: use FeeResult to collect block fees #652

Merged
merged 8 commits into from
Dec 6, 2022
Merged

Conversation

shumkov
Copy link
Member

@shumkov shumkov commented Dec 4, 2022

Issue being fixed or feature implemented

To implement credit refunds, all fee results with removed bytes should be collected and passed back to RS Drive. It makes sense to unify this logic and use FeeResult to collect and aggregate block fees as well

What was done?

  • Repository methods return FeeResult from RS Drive
  • Collect and aggregate Fee Results during block processing
  • Added editor config to define 4 spaces indent for Rust files
  • Removed unnecessary Read and Write operations

How Has This Been Tested?

With tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov changed the title feat: refund credits for removed data refactor: refund credits for removed data Dec 6, 2022
@shumkov shumkov changed the title refactor: refund credits for removed data refactor: use FeeResult to collect block fees Dec 6, 2022
@shumkov shumkov added this to the v0.24.0 milestone Dec 6, 2022
@shumkov shumkov marked this pull request as ready for review December 6, 2022 12:50
@shumkov shumkov requested a review from antouhou as a code owner December 6, 2022 12:50
jawid-h
jawid-h previously approved these changes Dec 6, 2022
Copy link
Contributor

@jawid-h jawid-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit to me

QuantumExplorer
QuantumExplorer previously approved these changes Dec 6, 2022
Copy link
Member

@QuantumExplorer QuantumExplorer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust side looks good.

@shumkov shumkov dismissed stale reviews from QuantumExplorer and jawid-h via a49e8b9 December 6, 2022 15:50
@shumkov shumkov merged commit 01c83aa into v0.24-dev Dec 6, 2022
@shumkov shumkov deleted the credit-refunds branch December 6, 2022 17:38
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