Пример #1
0
 def set_state(self, state, message, object_id, target_id=None):
     """Creates a new address in the blockchain state"""
     store = self.message_to_storage(message=message)
     # pylint: disable=no-member,not-callable
     container = self._state_container()
     container.users.extend([store])
     address = self.address(object_id=object_id, target_id=target_id)
     state_client.set_address(state=state,
                              address=address,
                              container=container)
 def set_state(self, context, message, outputs, object_id, related_id=None):
     """Creates a new address in the blockchain state"""
     store = self.message_to_storage(message=message)
     # pylint: disable=no-member,not-callable
     container = self._state_container()
     getattr(container, self._state_container_list_name).extend([store])
     address = self.address(object_id=object_id, related_id=related_id)
     if address not in outputs:
         raise ValueError(
             "Address {} not in listed outputs".format(addresser.parse(address))
         )
     state_client.set_address(context=context, address=address, container=container)