Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check spec for network list #324

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Add check spec for network list #324

merged 1 commit into from
Jun 9, 2022

Conversation

irisZhangCB
Copy link
Contributor

@irisZhangCB irisZhangCB commented Jun 9, 2022

Fixes # .

Motivation

Add check spec for network list

Solution

Open questions

@irisZhangCB irisZhangCB force-pushed the check-spec-iris branch 2 times, most recently from eea51fe to 33e85e1 Compare June 9, 2022 03:34
return fmt.Errorf("network_identifiers are required")
}
for _, network := range networks.NetworkIdentifiers {
if types.Hash(network.Network) == types.Hash(Config.Network.Network) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use network.Network == Config.Network.Network?

Copy link
Contributor

Choose a reason for hiding this comment

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

And also in line 151: network.Blockchain == Config.Network.Blockchain?

Copy link
Contributor Author

@irisZhangCB irisZhangCB Jun 9, 2022

Choose a reason for hiding this comment

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

@shiatcb yes i'm trying to follow this when checking if network if supported for check:data and check:construction. but i also prefer network.Network == Config.Network.Network tbh, if you think it doesn't harm i can change it!

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I c, both network.Network and Config.Network.Network are pointers, that might be the reason to use types.Hash. Would you mind running the test locally and verify if types.Hash is needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Confused myself. Both are strings, not pointers. In this case I don't think we need types.Hash.

@irisZhangCB irisZhangCB marked this pull request as ready for review June 9, 2022 16:34
@cb-heimdall
Copy link

Review Error for shiatcb @ 2022-06-09 17:06:06 UTC
User must have write permissions to review

@irisZhangCB irisZhangCB merged commit 6ecbb34 into master Jun 9, 2022
@irisZhangCB irisZhangCB deleted the check-spec-iris branch June 9, 2022 19:18
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.

None yet

4 participants