Function assert_local_note_was_valid_by
pub fn assert_local_note_was_valid_by<Note>(
block_header: BlockHeader,
hinted_note: HintedNote<Note>,
context: &mut PrivateContext,
)
where
Note: NoteHash
pub fn assert_local_note_was_valid_by<Note>(
block_header: BlockHeader,
hinted_note: HintedNote<Note>,
context: &mut PrivateContext,
)
where
Note: NoteHash
Asserts a note existed and had not yet been nullified by a given block.
Combines
assert_note_existed_byandassert_local_note_was_not_nullified_by: it proves both that the note existed atblock_headerand that it had not been nullified then. A contract typically uses this as a security gate before acting on a note whose validity at some past block matters.Local notes only
Like
assert_local_note_was_not_nullified_by, this can only be used for notes of the executing contract. Useassert_note_existed_byon its own to prove existence of another contract's notes.