Skip to content

Add unit tests for the price snapshot writer skipping a write when the price is unchanged from the previous snapshot #763

Description

@Chucks1093

Summary

Recording a price snapshot when the price has not changed wastes storage and pollutes the price history chart. The snapshot writer should skip the write if the new price equals the most recent stored snapshot for that creator.

Scope

  • Test a new price equal to the previous snapshot results in no database write
  • Test a new price different from the previous snapshot results in a write
  • Test the first snapshot for a creator is always written (no previous to compare)

Acceptance Criteria

  • Unchanged price skips the write
  • Changed price triggers the write
  • First snapshot always written

ETA: 12 hours


Coordinate on Telegram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions