Skip to content

Commit

Permalink
[FAB-6471] NodeSDK - remove header return
Browse files Browse the repository at this point in the history
NodeSDK no longer needs the header as an input
parameter and should be removed from the response
Update test cases to reflect this change.

Change-Id: I8abdaf247f08f4b01ebd669128a132df3c476e04
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
  • Loading branch information
harrisob committed Oct 6, 2017
1 parent 4800f64 commit 3c8ec76
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions fabric-client/lib/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ var Channel = class {
return clientUtils.sendPeersProposal(peers, signed_proposal, timeout)
.then(
function(responses) {
return [responses, proposal, header];
return [responses, proposal];
}
);
}
Expand Down Expand Up @@ -1318,7 +1318,7 @@ var Channel = class {
return clientUtils.sendPeersProposal(request.targets, signed_proposal, timeout)
.then(
function(responses) {
return Promise.resolve([responses, proposal, header]);
return Promise.resolve([responses, proposal]);
}
).catch(
function(err) {
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 @@ -873,7 +873,7 @@ var Client = class extends BaseClient {
return clientUtils.sendPeersProposal(peers, signed_proposal, timeout)
.then(
function(responses) {
return [responses, proposal, header];
return [responses, proposal];
}
);
});
Expand Down
5 changes: 1 addition & 4 deletions test/integration/invoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ function invokeChaincode(userOrg, version, t, shouldFail, peers){

}).then((results) => {
var proposalResponses = results[0];

var proposal = results[1];
var header = results[2];
var all_good = true;

for(var i in proposalResponses) {
Expand Down Expand Up @@ -235,8 +233,7 @@ function invokeChaincode(userOrg, version, t, shouldFail, peers){

var request = {
proposalResponses: proposalResponses,
proposal: proposal,
header: header
proposal: proposal
};

// set the transaction listener and set a timeout of 30sec
Expand Down
4 changes: 1 addition & 3 deletions test/integration/orderer-channel-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ test('\n\n** TEST ** orderer via member bad request', function(t) {
// send to orderer
var request = {
proposalResponses: 'blah',
proposal: 'blah',
header: 'blah'
proposal: 'blah'
};
return channel.sendTransaction(request);
},
Expand Down Expand Up @@ -236,4 +235,3 @@ test('\n\n** TEST ** orderer via member bad request', function(t) {
t.end();
});
});

4 changes: 1 addition & 3 deletions test/integration/perf/orderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ function makeEnvelope(signer, type) {
// send to orderer
// var request = {
// proposalResponses: 'blah',
// proposal: 'blah',
// header: 'blah'
// proposal: 'blah'
// };
// return channel.sendTransaction(request);
// ).then(
Expand All @@ -311,4 +310,3 @@ function makeEnvelope(signer, type) {
// t.pass('Error: ' + err);
// t.end();
// });

0 comments on commit 3c8ec76

Please sign in to comment.