Skip to content

Commit

Permalink
feat(indexer): add logging info for event insertion (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptisserand authored Apr 29, 2024
1 parent dab4470 commit c04df93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/indexer/src/ethereum_indexer/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ where
Err(e) => log::warn!("Failed to compute event price: {:?}", e),
}
}


log::info!("Insert event: {:?}", &e);
self.store.insert_event(e.clone()).await?;

if self.store.req_by_hash(&r.hash).await?.is_none() {
Expand Down Expand Up @@ -319,7 +320,8 @@ where
event.label = EventLabel::WithdrawAvailableL1;
// TODO: which transaction hash we should set?
event.tx_hash = "0x435553544f4d5f5452414e53414354494f4e".to_owned(); // CUSTOM_TRANSACTION


log::info!("Insert event: {:?}", &event);
self.store.insert_event(event).await?;
self.store.remove_pending_withdraw(pending).await?;
}
Expand Down
1 change: 1 addition & 0 deletions apps/indexer/src/starknet_indexer/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ where
Ok(store_data) => match store_data {
(Some(req), Some(ev), xchain_tx) => {
log::debug!("Request/Event/Tx\n{:?}\n{:?}\n{:?}", req, ev, xchain_tx);
log::info!("Insert event: {:?}", &ev);
self.store.insert_event(ev.clone()).await?;

if self.store.req_by_hash(&req.hash).await?.is_none() {
Expand Down

0 comments on commit c04df93

Please sign in to comment.