-
Notifications
You must be signed in to change notification settings - Fork 58
Moved service registration in final SDK from base SDKs #786
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
base: f-remove-sp
Are you sure you want to change the base?
Conversation
dee6a7e
to
1ba5fc1
Compare
Signed-off-by: Alexandros Filios <[email protected]>
5e4f74c
to
d0a8ec0
Compare
Signed-off-by: Alexandros Filios <[email protected]>
Signed-off-by: Alexandros Filios <[email protected]>
Signed-off-by: Alexandros Filios <[email protected]>
Signed-off-by: Alexandros Filios <[email protected]>
Signed-off-by: Alexandros Filios <[email protected]>
Signed-off-by: Alexandros Filios <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, remove the panics.
@@ -23,6 +23,9 @@ var ( | |||
logger = logging.MustGetLogger("fabric-sdk") | |||
) | |||
|
|||
const DefaultNetwork = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, add as single block of constants and give a description of the them
@@ -36,10 +36,10 @@ func Wrap(tx *endorser.Transaction) (*Transaction, error) { | |||
|
|||
// NewTransaction returns a new instance of a state-based transaction that embeds a single namespace. | |||
func NewTransaction(context view.Context) (*Transaction, error) { | |||
return newTransaction(utils.MustGet(fabric.GetNetworkServiceProvider(context)), context) | |||
return NewTransactionWithFNSP(utils.MustGet(fabric.GetNetworkServiceProvider(context)), context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, don't panic here, check what's the output of fabric.GetNetworkServiceProvider
and return an error.
@@ -211,6 +216,9 @@ func ExchangeRecipientIdentities(context view.Context, recipient view.Identity, | |||
Network: opt.Network, | |||
Other: recipient, | |||
IdentityLabel: opt.Identity, | |||
|
|||
fnsProvider: utils.MustGet(fabric.GetNetworkServiceProvider(context)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plase, don't panic, check the output of fabric.GetNetworkServiceProvider
.
finality: o.finality, | ||
timeout: o.timeout, | ||
fnsProvider: utils.MustGet(fabric.GetNetworkServiceProvider(ctx)), | ||
finalityView: NewFinalityViewFactory(utils.MustGet(fabric.GetNetworkServiceProvider(ctx))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, don't panic.
This PR enables us to write application without the need for the Service Provider. To this end: