-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sim-all: allows aliases to be used as source/destination of activities
The approach followed for this is pretty straight-forward: instead of loading `PublicKey`s directly to our `ActivityDefinition` data structure, we create an intermediary class `ActivityParser` that accepts `NodeId`. However, we internally identify activities using `PublicKey`s, so we do an additional mapping step once the data is loaded to go from `ActivityParser` to `ActivityDefinition`, hence, once data is passed to the simulator it is always identified by `PublicKey`. For activity destinations, we also need to make sure that if an alias has been provided we do control that node, otherwise the Alias->PublicKey mapping cannot be done, in which case we fail with a `ValidationError`.
- Loading branch information
Showing
2 changed files
with
107 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters