You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I was trying to use off_chain_data Repository and trying to listen block level events in Golang. Sorry to inform you that I am not able to receive blocklevel events at all. It is just showing block 0 always and not moving ahead. I have given the sample code. Please let me know if there is any problem with the code or any other setting to be performed at network level.
One more observation is if the code is written in nodejs than I am able to listen block level event but not in Golang.
Please provide the fix for the above mentioned problem.
Hi
I was trying to use off_chain_data Repository and trying to listen block level events in Golang. Sorry to inform you that I am not able to receive blocklevel events at all. It is just showing block 0 always and not moving ahead. I have given the sample code. Please let me know if there is any problem with the code or any other setting to be performed at network level.
One more observation is if the code is written in nodejs than I am able to listen block level event but not in Golang.
Please provide the fix for the above mentioned problem.
Sample function
func startBlocklevelEventListening(ctx context.Context, network client.Network) {
blockEvents, blockErr := network.BlockEvents(ctx, client.WithStartBlock(1))
if blockErr != nil {
panic(fmt.Errorf("failed to start chaincode event listening: %w", blockErr))
}
fmt.Println("\n** Start Block event listening")
}
The text was updated successfully, but these errors were encountered: