-
manish authored
In the current code, before adding a block to the ledger, ledger verifies the correct sequence number of the block just to double check that gossip is delivering the right sequence of blocks. In addition, before block is delivered to ledger, the signatures of the ordering service node(s) are verified that fulfills the requirement of the trust model. Though the above checks are sufficient for keeping an unintended block from getting committed to ledger. Still, it may not be a bad idea to add an additional check that verifies that the field `block.Header.PreviousHash` present in the block matches with the hash of the last committed block. This check is a simple bytes comparison and hence does not cause any observable performance penalty and may help in detecting a rare scenario if there is any bug in the ordering service. FAB-12033 #done Change-Id: I8d42bc4969d390a2c0f3aad0f7ff884f273c2ba9 Signed-off-by: manish <manish.sethi@gmail.com>
161e7608