How to register TxStatusEvent #fabric-questions #fabric-sdk-go


Yueming Xu
 

How do I call `(c *Client) RegisterTxStatusEvent(txID string)` from client before I submit a transaction?  The following code executes a transaction, and returns a transactionID in the response, but is it too late to register the TxStatusEvent after this call?  Is it possible to get a txID first, and then call RegisterTxStatusEvent, and then call execute?
```
client, err := channel.New(sdk.ChannelContext(config.ChannelID, opts...))
response, err := client.Execute(channel.Request{ChaincodeID: ccID, Fcn: fcn, Args: args, TransientMap: transient},
channel.WithRetry(retry.DefaultChannelOpts),
)
```