handle gateway info metadata struct #424
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*** NOTE *** this has a dep on a yet to be created proto branch which will return a gateway metadata struct containing asserted related fields. Until that proto is available it maps the existing gateway info proto to a newly updated internal GatewayInfo struct.
With this change, when resolving gateway info for a beaconer or a witness, we only return the gateway info if it contains the expected asserted related fields. These will be contained within an Option field of gateway info, if this is None it is assumed the gateway is not yet asserted and an appropriate error is returned.
The verifier will only proceed to verifying a beacon or witness if the asserted data is available, otherwise a verification fail is returned immediately.