Skip to content

Commit

Permalink
[FABN-908] using channel eventhub offline
Browse files Browse the repository at this point in the history
support sign the payload for channel eventhub registration
offline

Change-Id: I3671348f2d24fa5abb801b319cd7505006ad5a2b
Signed-off-by: zhaochy <zhaochy_2015@hotmail.com>
  • Loading branch information
zhaochy1990 committed Sep 12, 2018
1 parent 399bd25 commit 91c1f17
Show file tree
Hide file tree
Showing 4 changed files with 237 additions and 55 deletions.
6 changes: 3 additions & 3 deletions fabric-client/lib/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2914,8 +2914,8 @@ const Channel = class {
};

// certificate, publicKey, mspId, cryptoSuite
const signer = new Identity(certificate, null, mspId);
const txId = new TransactionID(signer, admin);
const identity = new Identity(certificate, null, mspId);
const txId = new TransactionID(identity, admin);

const channelHeader = client_utils.buildChannelHeader(
_commonProto.HeaderType.ENDORSER_TRANSACTION,
Expand All @@ -2927,7 +2927,7 @@ const Channel = class {
this._clientContext.getClientCertHash()
);

const header = client_utils.buildHeader(signer, channelHeader, txId.getNonce());
const header = client_utils.buildHeader(identity, channelHeader, txId.getNonce());
const proposal = client_utils.buildProposal(invokeSpec, header, request.transientMap);
return { proposal, txId };
}
Expand Down
Loading

0 comments on commit 91c1f17

Please sign in to comment.