code: def chain_update(self, block, receipts):
          
  
          block_events = BlockEventExtractor(block).extract([
              EventSubscription(event_type="sawtooth/block-commit")])
          receipt_events = ReceiptEventExtractor(receipts).extract([
              EventSubscription(event_type="identity/update")])
  
          for event in block_events:
              forked = self._handle_block_commit(event)
              if forked:
                  return
  
          for event in receipt_events:
              if event.event_type == "identity/update":
                  self._handle_txn_commit(event)
docs: Handles both "sawtooth/block-commit" Events and "identity/update"
          Events. For "sawtooth/block-commit", the last_block_num is updated or a
          fork is detected. For "identity/update", the corresponding cache entry
          will be updated.