Open netopyr opened 2 months ago
hi @netopyr I would like to contribute to this issue.
hii @netopyr, being a beginner i would like to contribute to this issue
Hello ! I am new to open-source projects. I am working as junior dev in c#/React, also have 3 year experience with Java. Can I work on this issue? Thanks ! :)
@SanikaBhalerao1345 please go ahead. If you have any questions, do not hesitate to ask.
@boooby19 I assigned to you the other issue you were interested in.
@boooby19 are you still interested in this issue??. Otherwise I can take it up
🆕🐥 First Timers Only
This issue is reserved for people who have never contributed to Hedera or any open source project in general. We know that creating a pull request (PR) is a major barrier for new contributors. The goal of this issue and all other issues labeled by 'Good First Issue' is to help you make your first contribution to Hedera.
👾 Description of the issue
The method
CustomFractionalFeeAssessor.reclaim()
sums up values from aMap
:To ensure there is no overflow, it checks after each add, if the value has become negative. As all summands are positive, this can only happen after an overflow in which case an
Exception
is thrown.While technically correct, this implementation is confusing. Adding some comments would help, but changing the code to make the intent more obvious is even better.
Proposed Solution:
Reimplement the above functionality using
Math.addExact()
which throws anArithmeticException
if an overflow occurs. Feel free to use the Stream-API instead of an explicit loop.📋 Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. More information and concrete samples for shell commands for each step can be found in our CONTRIBUTING.md file. A more detailed general documentation of the GitHub PR workflow can be found here.
sign-off
information to the commit to accept the "Developer Certificate of Origin" (https://developercertificate.org). More details can be found in our CONTRIBUTING.md🎉 Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. 🎽
🤔 Additional Information
If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.