pyth-network / pyth-client

Client API for on-chain pyth programs
https://pyth.network
Apache License 2.0
169 stars 102 forks source link

Support aggregation in validator #410

Closed Riateche closed 2 months ago

Riateche commented 3 months ago
guibescos commented 3 months ago

I think there might be an edgecase where the price stops aggregating (both v1 and v2). In a given slot:

Next slot:

And so on... let me know if you agree

Riateche commented 2 months ago

I think there might be an edgecase where the price stops aggregating (both v1 and v2).

Good catch! I've changed the code so that the MESSAGE_BUFFER_CLEARED is set regardless of the message_sent_ flag. I think this should fix the issue.