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

fix: remove hard coded address #820

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

renancloudwalk
Copy link
Contributor

No description provided.

@renancloudwalk renancloudwalk requested a review from a team as a code owner May 10, 2024 12:36
Copy link

PR Review 🔍

⏱️ Estimated effort to review [1-5]

2, because the PR is focused on a specific change which is removing hardcoded values, and the change is localized to a few lines. The logic seems straightforward and does not involve complex algorithms or multiple components.

🧪 Relevant tests

No

⚡ Possible issues

Possible Bug: The removal of the hardcoded address check might introduce a change in behavior if the Address::BRLC had special handling. Ensure that the removal of this condition does not affect the expected functionality of the system.

🔒 Security concerns

No

Code feedback:

Copy link

PR Code Suggestions ✨

CategorySuggestions                                                                                                                                                       
Enhancement
Add error handling for the case where an account is not found.

*Consider handling the case where self.accounts.get(&((address).into())) returns None.
Currently, if there is no account associated with the given address, the method might
panic or behave unexpectedly. To improve robustness, you can add error handling or a
default case.

src/eth/storage/rocks/rocks_state.rs [521-522]

 match self.accounts.get(&((*address).into())) {
     Some(inner_account) => {
+    None => {
+        // Handle the case where the account is not found
+        return None;
+    }
 

@renancloudwalk renancloudwalk enabled auto-merge (squash) May 10, 2024 12:40
@renancloudwalk renancloudwalk merged commit 1e0ec3d into main May 10, 2024
26 checks passed
@renancloudwalk renancloudwalk deleted the remove-hardcoded-address branch May 10, 2024 12:42
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.

1 participant