diff --git a/src/aleph_vrf/executor/main.py b/src/aleph_vrf/executor/main.py index 3e00b2a..a61e996 100644 --- a/src/aleph_vrf/executor/main.py +++ b/src/aleph_vrf/executor/main.py @@ -100,7 +100,7 @@ async def receive_publish(hash_message: str) -> APIResponse: f"Random bytes not existing for execution {response_hash.execution_id}" ) - random_bytes: bytes = SAVED_GENERATED_BYTES[str(response_hash.execution_id)] + random_bytes: bytes = SAVED_GENERATED_BYTES.pop(str(response_hash.execution_id)) response_bytes = VRFRandomBytes( request_id=response_hash.request_id, @@ -115,6 +115,8 @@ async def receive_publish(hash_message: str) -> APIResponse: message_hash = await publish_data(response_bytes, ref, account) + + response_bytes.message_hash = message_hash return APIResponse(data=response_bytes)