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

test network incorrectly recreates a fabric network when creating a channel #1243

Open
davidkel opened this issue Aug 8, 2024 · 0 comments

Comments

@davidkel
Copy link
Contributor

davidkel commented Aug 8, 2024

Doing the following

./network.sh up -s couchdb
./network.sh createChannel -c mychannel

results in the fabric network being recreated by the createChannel command using levelDB. The reason for this is due to this check in the createChannel Function of network.sh

 [[ $len -lt 4 ]] || [[ ! -d "organizations/peerOrganizations" ]] && bringUpNetwork="true" || echo "Network Running Already"

as no fabric-tools image now pulled and launched the check that there are less than 4 images running is not correct.

I do have to question as to why does the createChannel attempt to start a network if no network exists ? The paradigm of doing a single action may be better here and just have the up command do it

But as of now it is wrong so a quick fix would be

 [[ $len -lt 3 ]] || [[ ! -d "organizations/peerOrganizations" ]] && bringUpNetwork="true" || echo "Network Running Already"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant