Skip to content

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.

4 participants