Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Apr 20, 2023
1 parent 44ded36 commit 588a499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions reward_index/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ impl Indexer {
return Ok(());
}
msg = receiver.recv() => if let Some(file_info_stream) = msg {
tracing::info!("Processing reward file {}", file_info_stream.file_info.key);
let key = file_info_stream.file_info.key.clone();
tracing::info!("Processing reward file {}", key);
let mut txn = self.pool.begin().await?;
let mut stream = file_info_stream.into_stream(&mut txn).await?;

Expand All @@ -77,6 +78,7 @@ impl Indexer {
}

txn.commit().await?;
tracing::info!("Completed processing reward file {}", key);
}
}
}
Expand Down Expand Up @@ -108,7 +110,7 @@ impl Indexer {
for (reward_key, amount) in hotspot_rewards {
reward_index::insert(
&mut *txn,
&reward_key.key,
reward_key.key,
amount,
reward_key.reward_type,
&manifest_time,
Expand Down
2 changes: 1 addition & 1 deletion reward_index/src/reward_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use chrono::{DateTime, Utc};

pub async fn insert<'c, E>(
executor: E,
address: &String,
address: String,
amount: u64,
reward_type: RewardType,
timestamp: &DateTime<Utc>,
Expand Down

0 comments on commit 588a499

Please sign in to comment.