reach-sh / reach-lang

Reach: The Safest and Smartest DApp Programming Language
https://www.reach.sh
Apache License 2.0
581 stars 167 forks source link

add nextUpToTime to event stream interface #1559

Closed willghatch closed 1 year ago

willghatch commented 1 year ago

As discussed previously, this allows for users to get all events up to a particular time and batch them for purposes like atomic database transactions that keep the database consistently in sync with a particular block time. Because typical contracts with events may emit zero to many events per block, the next API does not give users a clean way to see if there are more events for a block time (including the latest) without waiting potentially indefinitely for a future event that may never come.