Skip to content

Commit

Permalink
Fix missing accounts on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbogle committed Mar 6, 2023
1 parent ca7e67e commit 5489ed2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/postgres_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ impl PostgresClient for SimplePostgresClient {
let client = &mut self.client.get_mut().unwrap();
if is_startup {
self.slots_at_startup.insert(account.slot as u64);
self.pending_account_updates.push(account);
// flush if batch size
if self.pending_account_updates.len() >= self.batch_size {
info!("[update_account_batch][flushing_accounts] length={}/{}", self.pending_account_updates.len(), self.batch_size);
Expand All @@ -158,8 +159,6 @@ impl PostgresClient for SimplePostgresClient {
msg: format!("[update_account_batch] error=[{}]", err),
})));
};
} else {
self.pending_account_updates.push(account);
}
return Ok(());
}
Expand Down

0 comments on commit 5489ed2

Please sign in to comment.