Skip to content
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

FABN-1491: Updated realtime block event listening #144

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

bestbeforetoday
Copy link
Member

No description provided.

@bestbeforetoday bestbeforetoday force-pushed the FABN-1491 branch 3 times, most recently from f879515 to 29a1287 Compare February 26, 2020 14:28
@bestbeforetoday bestbeforetoday marked this pull request as ready for review February 26, 2020 16:09
@bestbeforetoday bestbeforetoday requested a review from a team as a code owner February 26, 2020 16:09
* events from all peers in the client identity's organization.
* The [submitTransaction]{@link module:fabric-network.Contract#submitTransaction} function will wait until successful
* events are received from <em>all</em> currently connected peers (minimum 1).
* @property {module:fabric-network.TxEventHandlerFactory} MSPID_SCOPE_ALLFORTX Listen for transaction commit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look the same ?

Copy link
Member Author

@bestbeforetoday bestbeforetoday Feb 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the scope of TxEventHandlerFactory to the top level instead of nested within Gateway (or wherever it was nested before). This makes the JSDoc match the existing TypeScript definitions.


await network.addBlockListener(listener);
eventService.sendEvent(event2);
eventService.sendEvent(event1); // Ignored as older than first block received
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will have to warn the user that if the first block is received out of order they will miss blocks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for realtime listening. In that case you get all blocks (in order) with a larger block number than the first one the client sees. For replay you get from exactly the block you specified. Nothing gets missed.

@andrew-coleman andrew-coleman merged commit ddf1d71 into hyperledger:master Feb 27, 2020
@bestbeforetoday bestbeforetoday deleted the FABN-1491 branch April 23, 2020 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants