-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: Update ConsensusUpdateTopicHandler with new custom fee functionality #15539
base: hip-991-topic-fees-create
Are you sure you want to change the base?
feat: Update ConsensusUpdateTopicHandler with new custom fee functionality #15539
Conversation
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## hip-991-topic-fees-create #15539 +/- ##
===============================================================
- Coverage 58.05% 58.05% -0.01%
- Complexity 21535 21546 +11
===============================================================
Files 2776 2776
Lines 109082 109123 +41
Branches 11188 11198 +10
===============================================================
+ Hits 63326 63346 +20
- Misses 41891 41908 +17
- Partials 3865 3869 +4
|
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
} else { | ||
builder.adminKey(topic.adminKey()); |
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.
Since the change here the builder is one to one to the topic. There is no need to copy over the values again. Also, I changed the resolvedUpdateMetaFrom
method(called below) to expect ExpiryMeta
instead of Topic
and build the ExpiryMeta
before the call. That way we don't need to pass Topic
private void validateMaybeNewExpiry( | ||
@NonNull final ExpiryValidator expiryValidator, | ||
@NonNull final ConsensusUpdateTopicTransactionBody op, | ||
@NonNull final Topic topic) { | ||
resolvedUpdateMetaFrom(expiryValidator, op, topic); |
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.
I deleted this method because the resolvedUpdateMetaFrom
method is called twice in the handle
- once from validateMaybeNewAttributes.validateMaybeNewExpiry
and once from resolveMutableBuilderAttributes
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
Signed-off-by: Valentin Tronkov <99957253+vtronkov@users.noreply.github.com>
Description:
Related issue(s):
Fixes #15513
Notes for reviewer:
Checklist