Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 transaction storage pallet to use fungible traits #1800
Refactor transaction storage pallet to use fungible traits #1800
Changes from 9 commits
362e261
0bf9b61
00e6fc7
c10caac
d716906
820a279
6c0c9c4
e8bf46a
17addaa
11fa7ca
5248376
27f6999
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems logically equivalent to just reducing the account balance by
fee
if the balance is gtfee
(which seems way simpler)? Or am I missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if equivalent, the imbalance/credit does need to go to
T::FeeDestination
, but maybe this can be changed too.@paritytech/frame-coders may have a stronger opinion which way to go here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could very well usedecrease_balance()
which returns the reduced balance. I don't see why that wouldn't work.Though, I don't know why it was not used in the original code
Disregard my previous comment, I think @acatangiu you are right, we do want
slash
to manage the imbalance andT::FeeDestination
to do whatever it needs to be done for us.decrease_balance()
should not be used directly for that reason.polkadot-sdk/substrate/frame/support/src/traits/tokens/fungible/regular.rs
Lines 122 to 127 in 21d36b7