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
Today we use a function called account_id_to_shard_id in order to figure out what shard an account belongs to. It's a bit annoying to use. A better way would be to have it as a method in ShardLayout. This would be nicer since then the IDE can suggest this method when dealing with ShardLayout. It also seem more natural to have it as a method.
The goals of this issue are to:
Implement account_id_to_shard_id as a method in ShardLayout
Adjust the existing account_id_to_shard_id to simply called the ShardLayout::account_id_to_shard_id
Migrate a few usages of the old one to the new one.
There is no need to migrate all of the old usages as that may be annoying and of little learning value. It's fine to just do a few to show that it works.
Description
Today we use a function called
account_id_to_shard_id
in order to figure out what shard an account belongs to. It's a bit annoying to use. A better way would be to have it as a method in ShardLayout. This would be nicer since then the IDE can suggest this method when dealing with ShardLayout. It also seem more natural to have it as a method.The goals of this issue are to:
account_id_to_shard_id
as a method in ShardLayoutaccount_id_to_shard_id
to simply called the ShardLayout::account_id_to_shard_idThere is no need to migrate all of the old usages as that may be annoying and of little learning value. It's fine to just do a few to show that it works.
reference:
nearcore/core/primitives/src/shard_layout.rs
Lines 760 to 765 in 10369c6
The text was updated successfully, but these errors were encountered: