Skip to content

Commit

Permalink
Fix contract usage for games in SOL
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Nov 29, 2024
1 parent cfb35e1 commit 0769dcc
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 115 deletions.
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edition = "2021"
4 changes: 2 additions & 2 deletions transactor/src/component/synchronizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ impl Component<PipelinePorts, GameSynchronizerContext> for GameSynchronizer {

sub_item = sub.next() => {
if let Some(Some(game_account)) = sub_item {
retry = 0;

let GameAccount {
players,
Expand Down Expand Up @@ -164,9 +163,10 @@ impl Component<PipelinePorts, GameSynchronizerContext> for GameSynchronizer {
}

prev_access_version = access_version;
retry = 0;
} else {
retry += 1;
let interval = u64::pow(2, retry as _).min(20);
let interval = (retry * 10).min(20);
warn!("{} Game account not found, will retry after {} seconds", env.log_prefix, interval);
tokio::time::sleep(Duration::from_secs(interval)).await;
}
Expand Down
Loading

0 comments on commit 0769dcc

Please sign in to comment.