Skip to content

forge-stream — add test verifying get_claimable() returns 0 immediately after withdraw() with no time passing #314

@Austinaminu2

Description

@Austinaminu2

Summary

get_claimable() is a lightweight view function but there is no test verifying it returns 0 immediately after a full withdraw() call with no additional time passing. This is the most common polling pattern for UIs — check claimable, withdraw, check claimable again to confirm zero.

Tasks

  • Create a stream, advance time by 100s
  • Assert get_claimable() returns rate * 100
  • Call withdraw()
  • Without advancing time, assert get_claimable() returns 0
  • Advance time by another 50s
  • Assert get_claimable() returns rate * 50 (only newly accrued)
  • Verify this matches get_stream_status().withdrawable

Labels: testing, forge-stream

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions