Skip to content

Properly handle on_created_account related to inc_account_nonce logic#151

Merged
dmitrylavrenov merged 6 commits intoh-polkadot-v0.9.42from
fix-inc-nonce-creation
Feb 3, 2025
Merged

Properly handle on_created_account related to inc_account_nonce logic#151
dmitrylavrenov merged 6 commits intoh-polkadot-v0.9.42from
fix-inc-nonce-creation

Conversation

@dmitrylavrenov
Copy link

@dmitrylavrenov dmitrylavrenov commented Jan 31, 2025

Decided to rethink about #147 and all conversations we had.

Suggest to move decision making logic to doing checks whether account was existed before or not instead of checking account data values inside Account::<T>::mutate

@dmitrylavrenov dmitrylavrenov marked this pull request as ready for review January 31, 2025 12:26
Copy link

@MOZGIII MOZGIII left a comment

Choose a reason for hiding this comment

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

The semantics of the change is great! There's a small nit regarding the wording of vars, but otherwise it is much more reasonable.

Also, we can reduce the amount of storage calls by one if we do the check at the Account::<T>::mutate callback.

dmitrylavrenov and others added 2 commits February 3, 2025 01:37
@dmitrylavrenov dmitrylavrenov merged commit c65892f into h-polkadot-v0.9.42 Feb 3, 2025
@dmitrylavrenov dmitrylavrenov deleted the fix-inc-nonce-creation branch February 3, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants