mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
[FAB-5913]balance-transfer:Fix query response message
"queryChaincode" doesn’t output responses from all peers in log message. It exits the loop processing after outputting the first response. We should print all responses from all peers. Also, we should return a response (e.g. the response_payloads[0]) after the loop. This patch fixes the problems above. Change-Id: I92a0c5a663d6da0854d89bf76c5ba36da86754ef Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
This commit is contained in:
parent
ff5d80bcdc
commit
948e2372b8
1 changed files with 2 additions and 2 deletions
|
|
@ -44,9 +44,9 @@ var queryChaincode = async function(peer, channelName, chaincodeName, args, fcn,
|
|||
for (let i = 0; i < response_payloads.length; i++) {
|
||||
logger.info(args[0]+' now has ' + response_payloads[i].toString('utf8') +
|
||||
' after the move');
|
||||
return args[0]+' now has ' + response_payloads[i].toString('utf8') +
|
||||
' after the move';
|
||||
}
|
||||
return args[0]+' now has ' + response_payloads[0].toString('utf8') +
|
||||
' after the move';
|
||||
} else {
|
||||
logger.error('response_payloads is null');
|
||||
return 'response_payloads is null';
|
||||
|
|
|
|||
Loading…
Reference in a new issue