hyperledger-labs / fabric-smart-client

The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.
Apache License 2.0
51 stars 52 forks source link

allow a second registration of the same fabric driver #605

Closed arner closed 4 months ago

arner commented 5 months ago

In our project, we have integration tests that create two FSC nodes in a single process. It's a nice and quick way to start them. Since the new dig dependency injection, our test panics because the Fabric SDK is registered twice. This PR fixes that by just warning instead of panicking. But is this the way to go?

(Also, I'd be interested to know whether the driver registration + dig might be doing the same thing in two different ways? Do we need both?)

arner commented 4 months ago

@adecaro, @alexandrosfilios, what do you think of this?

adecaro commented 4 months ago

@arner , some additional details about why one would have two FSC stacks running in the same process?

adecaro commented 4 months ago

@arner , I'll close this given the PR that should fix the same issue. Feel free to reopen, if needed.