-
Notifications
You must be signed in to change notification settings - Fork 515
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
Conversation
f879515
to
29a1287
Compare
Signed-off-by: Mark S. Lewis <[email protected]>
29a1287
to
5e93c12
Compare
* 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 |
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.
look the same ?
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.
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 |
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.
We will have to warn the user that if the first block is received out of order they will miss blocks
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.
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.
No description provided.