You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of instances where the code could potentially panic, leading to the code crashing unexpectedly. For example, If any of the parameters in parameters/network/subsidy.rs are not correctly set, then this will lead to panics in all of the below functions
block/subsidy/general.rs#L106
block/subsidy/general.rs#L137
src/block/check.rs#L189
subsidy/funding_streams/tests.rs#L132
This is just an example and there may be other instances where this could happen.
Scope
Least Authority recommends removing panics where possible. One of the possible improvements is to propagate errors to the caller and handle them on the upper layers. Note that error handling does not exclude using panics. In addition, if a caller can return an error, the callee function may not panic but, instead, propagate an error to the caller.
The text was updated successfully, but these errors were encountered:
mpguerra
added
I-panic
Zebra panics with an internal error message
NU-6
Network Upgrade: NU6 specific tasks
C-audit
Category: Issues arising from audit findings
labels
Oct 2, 2024
Motivation
There are a number of instances where the code could potentially panic, leading to the code crashing unexpectedly. For example, If any of the parameters in parameters/network/subsidy.rs are not correctly set, then this will lead to panics in all of the below functions
This is just an example and there may be other instances where this could happen.
Scope
Least Authority recommends removing panics where possible. One of the possible improvements is to propagate errors to the caller and handle them on the upper layers. Note that error handling does not exclude using panics. In addition, if a caller can return an error, the callee function may not panic but, instead, propagate an error to the caller.
The text was updated successfully, but these errors were encountered: