Skip to content

Commit

Permalink
OnCommitStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
vncoelho authored Jan 27, 2019
1 parent 5976ca7 commit 09b7926
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion StatesDumper/StatesDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ private void OnPersistStorage(Snapshot snapshot)
}

public void OnCommit(Snapshot snapshot)
{
if (Settings.Default.PersistAction.HasFlag(PersistActions.StorageChanges))
OnCommitStorage(snapshot);
}

public void OnCommitStorage(Snapshot snapshot)
{
uint blockIndex = snapshot.Height;
if (bs_cache.Count > 0)
Expand All @@ -136,7 +142,7 @@ public void OnCommit(Snapshot snapshot)
}
}
}

public bool ShouldThrowExceptionFromCommit(Exception ex)
{
Console.WriteLine($"Error writing States with StatesDumper.{Environment.NewLine}{ex}");
Expand Down

0 comments on commit 09b7926

Please sign in to comment.