@@ -260,6 +260,8 @@ public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelC
260260
261261 try {
262262 final long startLastConfigIndex = getLastConfigIndex (orderer );
263+ logger .trace (format ("startLastConfigIndex: %d. Channel config wait time is: %d" ,
264+ startLastConfigIndex , CHANNEL_CONFIG_WAIT_TIME ));
263265
264266 sendUpdateChannel (updateChannelConfiguration .getUpdateChannelConfigurationAsBytes (), signers , orderer );
265267
@@ -274,9 +276,10 @@ public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelC
274276 final long duration = TimeUnit .MILLISECONDS .convert (System .nanoTime () - nanoTimeStart , TimeUnit .NANOSECONDS );
275277
276278 if (duration > CHANNEL_CONFIG_WAIT_TIME ) {
277- logger .warn (format ("Channel %s did not get updated last config after %d ms" , name , duration ));
279+ logger .warn (format ("Channel %s did not get updated last config after %d ms, Config wait time: %d ms. startLastConfigIndex: %d, currentLastConfigIndex: %d " ,
280+ name , duration , CHANNEL_CONFIG_WAIT_TIME , startLastConfigIndex , currentLastConfigIndex ));
278281 //waited long enough ..
279- currentLastConfigIndex = startLastConfigIndex ; // just bail don't throw exception.
282+ currentLastConfigIndex = startLastConfigIndex - 1L ; // just bail don't throw exception.
280283 } else {
281284
282285 try {
@@ -289,6 +292,8 @@ public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelC
289292
290293 }
291294
295+ logger .trace (format ("currentLastConfigIndex: %d" , currentLastConfigIndex ));
296+
292297 } while (currentLastConfigIndex == startLastConfigIndex );
293298
294299 } catch (TransactionException e ) {
@@ -386,7 +391,6 @@ private void sendUpdateChannel(byte[] configupdate, byte[][] signers, Orderer or
386391 String info = trxResult .getInfo ();
387392 if (null == info ) {
388393 info = "" ;
389-
390394 }
391395
392396 throw new TransactionException (format ("New channel %s error. StatusValue %d. Status %s. %s" , name ,
@@ -1059,7 +1063,11 @@ private Block getConfigurationBlock() throws TransactionException {
10591063 channelHeader .getChannelId (), name ));
10601064 }
10611065
1062- logger .trace (format ("Channel %s getConfigurationBlock returned %s" , name , String .valueOf (configBlock )));
1066+ if (null != diagnosticFileDumper ) {
1067+ logger .trace (format ("Channel %s getConfigurationBlock returned %s" , name ,
1068+ diagnosticFileDumper .createDiagnosticFile (String .valueOf (configBlock ).getBytes ())));
1069+ }
1070+
10631071 if (!logger .isTraceEnabled ()) {
10641072 logger .debug (format ("Channel %s getConfigurationBlock returned" , name ));
10651073 }
0 commit comments