Skip to content

Commit

Permalink
[FABN-1340] Fix typos and deadlinks in documents
Browse files Browse the repository at this point in the history
This CR fixes some typos and dead links in documents.
- Fix the dead link to configtxlator in some parts.
- Typo in channel-events.md
  - Replace the wrong 'oldest' to 'last_seen'.
  - Remove duplicated lines for block events
    in `How to use a Channel Event Hub`..
- Typo in listening-to-events.md
  - Fix callback function's params of addBlockListener().
- Typo in CommitHandler.js
  - Fix the return of commit() to BroadcastResponse.

FABN-1340 #done

Change-Id: I9654097235a16cbdd25af70122da586d9343691a
Signed-off-by: Yuki Kondo <[email protected]>
  • Loading branch information
yuki-kon committed Aug 8, 2019
1 parent 9761dce commit be1cb8b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/channel-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ process of creating and updating see
* configuration transaction generator see
[configtxgen](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#configuration-transaction-generator)
* configuration translation tool see
[configtxlator](https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate)
[configtxlator](https://hyperledger-fabric.readthedocs.io/en/latest/commands/configtxlator.html)

The following assumes an understanding of the Hyperledger Fabric network
(orderers and peers),
Expand Down
16 changes: 4 additions & 12 deletions docs/tutorials/channel-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ number determined by the Peer's channel-based event service at connect
time of the the oldest block on the ledger, unless your ledger
has been pruned, this will be block 0.

- `'last_seen'` - The string of 'oldest'. This will have the channel event hub
- `'last_seen'` - The string of 'last_seen'. This will have the channel event hub
instance determine the block number at the time of the registration.
The number will be based on the last block that this channel event hub has
received from the Peer's channel-based event service.
Expand Down Expand Up @@ -238,7 +238,7 @@ number determined by the Peer's channel-based event service at connect
time of the the oldest block on the ledger, unless your ledger
has been pruned, this will be block 0.

- `'last_seen'` - The string of 'oldest'. This will have the channel event hub
- `'last_seen'` - The string of 'last_seen'. This will have the channel event hub
instance determine the block number at the time of the registration.
The number will be based on the last block that this channel event hub has
received from the Peer's channel-based event service.
Expand Down Expand Up @@ -289,7 +289,7 @@ number determined by the Peer's channel-based event service at connect
time of the the oldest block on the ledger, unless your ledger
has been pruned, this will be block 0.

- `'last_seen'` - The string of 'oldest'. This will have the channel event hub
- `'last_seen'` - The string of 'last_seen'. This will have the channel event hub
instance determine the block number at the time of the registration.
The number will be based on the last block that this channel event hub has
received from the Peer's channel-based event service.
Expand Down Expand Up @@ -327,7 +327,7 @@ number determined by the Peer's channel-based event service at connect
time of the the oldest block on the ledger, unless your ledger
has been pruned, this will be block 0.

- `'last_seen'` - The string of 'oldest'. This will have the channel event hub
- `'last_seen'` - The string of 'last_seen'. This will have the channel event hub
instance determine the block number at the time of the registration.
The number will be based on the last block that this channel event hub has
received from the Peer's channel-based event service.
Expand Down Expand Up @@ -452,14 +452,6 @@ Steps to be notified when a block event occurs:
- Process the blocks as they come in.
- Disconnect the channel event hub when finished listening.

Steps to be notified when a block event occurs:
- Get a channel event hub instance.
- Register to receive blocks.
- Connect the channel event hub instance with the peer's event service.
- Somewhere on the network a transaction is endorsed and committed.
- Process the blocks as they come in.
- Disconnect the channel event hub when finished listening.

#### Replay events
If you wish to look at events that already happened, use the "startBlock"
option to replay the events. Using the start block will connect to the
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/listening-to-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const network = await gateway.getNetwork('mychannel');

/**
* @param {String} listenerName the name of the event listener
* @param {Function} callback the callback function with signature (error, blockNumber, transactionId, status)
* @param {Function} callback the callback function with signature (error, block)
* @param {module:fabric-network.Network~EventListenerOptions} options
**/
const listener = await network.addBlockListener('my-block-listener', (error, block) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/network-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process of creating and updating see
* configuration transaction generator see
[configtxgen](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#configuration-transaction-generator)
* configuration translation tool see
[configtxlator](https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate)
[configtxlator](https://hyperledger-fabric.readthedocs.io/en/latest/commands/configtxlator.html)

The following assumes an understanding of the Hyperledger Fabric network
(orderers and peers),
Expand Down
4 changes: 2 additions & 2 deletions fabric-client/lib/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ const Channel = class {
* response before rejecting the promise with a timeout error. This
* overrides the default timeout of the Orderer instance and the global
* timeout in the config settings.
* @returns {Promise} A Promise for a "BroadcastResponse" message returned by
* @returns {Promise} A Promise for a {@link BroadcastResponse} message returned by
* the orderer that contains a single "status" field for a
* standard [HTTP response code]{@link https://github.com/hyperledger/fabric/blob/v1.0.0/protos/common/common.proto#L27}.
* This will be an acknowledgement from the orderer of a successfully
Expand Down Expand Up @@ -3497,7 +3497,7 @@ const Channel = class {
* response before rejecting the promise with a timeout error. This
* overrides the default timeout of the Orderer instance and the global
* timeout in the config settings.
* @returns {Promise} A Promise for a "BroadcastResponse" message returned by
* @returns {Promise} A Promise for a {@link BroadcastResponse} message returned by
* the orderer that contains a single "status" field for a
* standard [HTTP response code]{@link https://github.com/hyperledger/fabric/blob/v1.0.0/protos/common/common.proto#L27}.
* submitted transaction.
Expand Down
2 changes: 1 addition & 1 deletion fabric-client/lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ const Client = class extends BaseClient {
* required settings and signatures to initialize this channel. This envelope
* would have been created by the command line tool
* [configtxgen]{@link http://hyperledger-fabric.readthedocs.io/en/latest/configtxgen.html} or
* [configtxlator]{@link https://github.com/hyperledger/fabric/blob/master/examples/configtxupdate/README.md}
* [configtxlator]{@link https://hyperledger-fabric.readthedocs.io/en/latest/commands/configtxlator.html}
* @property {byte[]} config - Optional. Protobuf ConfigUpdate object extracted from a ConfigEnvelope
* created by the configtxgen tool. See [extractChannelConfig()]{@link Client#extractChannelConfig}.
* The ConfigUpdate object may also be created by the configtxlator tool.
Expand Down
2 changes: 1 addition & 1 deletion fabric-client/lib/CommitHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CommitHandler {
* orderers to send the endorsed transaction.
*
* @param {CommitHandlerParameters} params - A {@link CommitHandlerParameters}
* @returns {Promise} A Promise for the {@link ProposalResponseObject}, the
* @returns {Promise} A Promise for the {@link BroadcastResponse}, the
* same results as calling the {@link Channel#sendTransaction}
* method directly.
*/
Expand Down
2 changes: 1 addition & 1 deletion test/integration/configtxlator.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* This test case requires that the 'configtxlator' tool be running locally and on port 7059
* see:
* https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate
* https://hyperledger-fabric.readthedocs.io/en/latest/commands/configtxlator.html
*
* This test case also requires two node packages to make it easier to make REST calls to
* the 'configtxlator'
Expand Down

0 comments on commit be1cb8b

Please sign in to comment.