kns_indexer: optimistically handle notes

This commit is contained in:
bitful-pannul 2024-08-26 16:23:23 +03:00
parent 09d537e9b0
commit be6b932165

View File

@ -433,6 +433,10 @@ fn handle_log(
if !kimap::valid_note(&note) {
return Err(anyhow::anyhow!("skipping invalid note: {note}"));
}
// handle note: if it precedes parent mint event, add it to pending_notes
if let Err(e) = handle_note(state, &decoded) {
if let Some(KnsError::NoParentError) = e.downcast_ref::<KnsError>() {
if let Some(KnsError::NoParentError) = e.downcast_ref::<KnsError>() {
if let Some(block_number) = log.block_number {
print_to_terminal(
1,
@ -444,6 +448,9 @@ fn handle_log(
.push((decoded, 0));
}
}
}
}
}
_log => {
return Ok(());
}