Hi Yuanbo Liu,
I was about to commit the patch and had one thought here. In the current patch, the new parameter header was added to verifyChunks(dataBuf, checksumBuf); just to make the info ready when an error is found, which is a waste since this parameter is not needed in normal run. Actually it is not necessary since we can make the following call:
PacketHeader header = packetReceiver.getHeader();
inside the error handling code in the exception handling code of verifyChunks.
This means verifyChunks has the requirement that the header got like I suggested above need to be consistent with the other two parameters passed to it. This is ok, since verifyChunks is a private method. That's why I added the above comments in the suggested change.
What do you think? thanks.