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
Currently, when creating a Client with a custom network (a custom mapping of node ids with host/port pairs) rather than one of the default networks (e.g. for mainnet or testnet), that mapping is defined as HashMap<String, AccountId> where the key is a host/port pair and the value is a node id.
Elsewhere in the crate, there is an EntityId type similar to AccountId but with different semantics. There is no NodeId type currently.
Is AccountId the appropriate type to model a node id, or should the existing EntityId or a new NodeId be used instead?
Solution
Refactor usages of this host to node map to have a different value type for the node other than AccountId.
Alternatives
For node identifiers, in place of AccountId, use existing EntityId type
For node identifiers, in place of AccountId, use a new NodeId type
The text was updated successfully, but these errors were encountered:
Problem
Currently, when creating a
Client
with a custom network (a custom mapping of node ids with host/port pairs) rather than one of the default networks (e.g. formainnet
ortestnet
), that mapping is defined asHashMap<String, AccountId>
where the key is a host/port pair and the value is a node id.Elsewhere in the crate, there is an
EntityId
type similar toAccountId
but with different semantics. There is noNodeId
type currently.Is
AccountId
the appropriate type to model a node id, or should the existingEntityId
or a newNodeId
be used instead?Solution
Refactor usages of this host to node map to have a different value type for the node other than
AccountId
.Alternatives
EntityId
typeNodeId
typeThe text was updated successfully, but these errors were encountered: