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: create the miner account if not exist #32

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

AshinGau
Copy link
Collaborator

No description provided.

@@ -624,6 +625,13 @@ where
}
info.balance = info.balance.saturating_add(U256::from(inc_rewards));
balance = info.balance;
} else if inc_rewards != 0 {
result = Ok(Some(AccountInfo::new(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this enough? Should we create insert this new account into the cache?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need. write set will commit back into cache.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding comments to explain what this temporary account is used for, as well as why nonce and code can be default values.

@nekomoto911 nekomoto911 merged commit abb9f6b into main Nov 27, 2024
3 checks passed
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.

2 participants