Closed ballad89 closed 8 months ago
Hi @ballad89, thanks for trying out the extension. The conclusions that you drew are correct. The Chaincode is actually running on your host machine (launched by VS Code). The peer (running as a container) simply connects to the Chaincode running on the host to execute the transactions. I'll definitely put this in the backlog to document how to connect to the local fabric environment from your own application, but meanwhile, some additional context on what you are doing will help:
Closing this issue as the steps for connecting from different application has been documented here.
Describe the problem that you are trying to solve.
When I try to use the fabric network setup by the debugger from an application, I get the error
The values I used were CA: https://localhost:5054 Peer: localhost:5051
Describe the solution you'd like I was hoping you could update the readme with instructions on how to use the debug fabric network from an application which submits transactions.
Additional context When I run
os.Hostname()
from within the chaincode, it prints the hostname of my macbook, not the hostname of the peer docker container I did this becauseshim.GetMSPID()
which checks for the env varCORE_PEER_LOCALMSPID
was returning nil, instead ofOrg1MSP
which is clearly set on the peer container. This makes it feel like the debug chaincode is installed on my local and not the peer container, which would explain the error above. Hence why I suspect that I am not using the setup correct. Tests fromtest.fabric
files do not have the same error