code: def _check_channel_state_for_update(
              self,
              channel_identifier: ChannelID,
              closer: Address,
              update_nonce: Nonce,
              block_identifier: BlockSpecification,
      ) -> Optional[str]:
          
          msg = None
          closer_details = self._detail_participant(
              channel_identifier=channel_identifier,
              participant=closer,
              partner=self.node_address,
              block_identifier=block_identifier,
          )
          if closer_details.nonce == update_nonce:
              msg = (
                  'updateNonClosingBalanceProof transaction has already '
                  'been mined and updated the channel succesfully.'
              )
  
          return msg
docs: Check the channel state on chain to see if it has been updated.
  
          Compare the nonce, we are about to update the contract with, with the
          updated nonce in the onchain state and, if it's the same, return a
          message with which the caller should raise a RaidenRecoverableError.
  
          If all is okay return None.