-
Notifications
You must be signed in to change notification settings - Fork 124
Milestone
Description
To enable building of public output notes in the network transaction builder, we need to add get_note_script() method do the data store (for more info see #1748). This method could look like so:
pub trait DataStore: MastForestStore {
fn get_note_script(
&self,
script_root: Word,
) -> impl FutureMaybeSend<Result<NoteScript, DataStoreError>>;
}This method will try to find a note script with the specified root in the data store, and if not found, return an error (e.g., DataStoreError::NoteScriptNotFound).
This method will be used in the TransactionHost::on_note_after_created(). Specifically, we'd probably need to refactor how it works with the OutputNoteBuilder because the sequence would need to be:
- Read note parameters from the stack.
- Try to look up the
RECIPIENTin the advice map. If found, extractSCRIPT_ROOTfrom it. - Try to get the script associated with the
SCRIPT_ROOTfrom the data store. - Build the output note and add it to the set of output notes tracked by the host.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels