Skip to content

Commit

Permalink
FAB-10717 NodeSDK - SD endorsements fail
Browse files Browse the repository at this point in the history
The DiscoveryEndorsementHandler needs to make a
deep clone of the service discover query results
to provide both a working copy that can be changed
and have a copy that will not be changed by during
the it's endorsement cycle. The current copy was
not deep enough and execution updates bleed through
to other executions.

Change-Id: I4586a118839f7d33b8985995617e4be85e9c80ff
Signed-off-by: Bret Harrison <[email protected]>
  • Loading branch information
harrisob committed Jun 19, 2018
1 parent 127de22 commit b351453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fabric-client/lib/impl/DiscoveryEndorsementHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class DiscoveryEndorsementHandler extends api.EndorsementHandler {
logger.debug('%s - no discovery results %s', method, error);
}
if(discovery_results && !request.targets) {
const working_discovery = Object.assign({}, discovery_results);
const working_discovery = JSON.parse(JSON.stringify(discovery_results));

return this._endorse(working_discovery, request, params.signed_proposal);
} else {
Expand Down

0 comments on commit b351453

Please sign in to comment.