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
53 stars 50 forks source link

allow a second registration of the same fabric driver #605

Closed arner closed 5 days ago

arner commented 1 week 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 6 days ago

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

adecaro commented 6 days ago

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

adecaro commented 5 days ago

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