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

Fix NWO when there is no FSC topology #686

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion integration/nwo/fabric/network/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ func (n *Network) CheckTopologyOrderers() {
// CheckTopologyFSCNodes checks that the FSC nodes' are well configured.
// It returns the parameters to be used for cryptogen.
func (n *Network) CheckTopologyFSCNodes() (users map[string]int, userSpecs map[string][]topology.UserSpec) {
fscTopology := n.Context.TopologyByName("fsc").(*fsc.Topology)
t := n.Context.TopologyByName("fsc")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should fail here because no FSC nodes have been configured. Maybe not, if one wants to use NWO to generate fabric related artifacts.

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nice if you can define a topology without any FSC nodes - just for whatever testing reason.

I am actually wondering why the fabric (nwo) platform performs this check? Shouldn't every nwo platform be independent and than nwo will perform this check (from outside the platforms)?

if t == nil {
return
}
fscTopology := t.(*fsc.Topology)

users = make(map[string]int)
userSpecs = make(map[string][]topology.UserSpec)
Expand Down