Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answer note is not stored for the oracle #7

Open
spalladino opened this issue Oct 4, 2023 · 1 comment
Open

Answer note is not stored for the oracle #7

spalladino opened this issue Oct 4, 2023 · 1 comment

Comments

@spalladino
Copy link

The note needs to passed through emit_encrypted_log for the oracle as well in order to be stored in its PXE.

// Store the answer in both sets (requester and oracle)
let mut new_answer: AnswerNote = AnswerNote::new(
question,
answer,
caller
);
storage.answers.insert(&mut new_answer);

Still, it may make sense that, if the note is emitted by the tx sender, there's no need to put it on chain. Let me chat about this one internally before you make the change!

@spalladino
Copy link
Author

I asked @LeilaWang about this, and you don't need to emit_encrypted_log if you manually call addNote on the sender's pxe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant