-
yacovm authored
This change set fixes a null pointer panic that happens when onboarding a node to a channel that has no application channels, and it only has 2 blocks in the system channel. The null pointer panic happens because the LastConfigBlock index is 1, and the previous index (0) was never pulled, so previous block passed into the VerifyBlocks method is nil. Although the genesis block of the system channel - cannot be verified by the block puller in general - it can be verified by the block puller that is used for listing the channels, because it doesn't perform signature checks on system channel blocks, and instead - uses backward hash chain verification using the bootstrap block. Change-Id: I5aaaffa79da637463da1689b1c6167e586f64f44 Signed-off-by: yacovm <yacovm@il.ibm.com>