Skip to content

Commit

Permalink
Reset previous timestamp when account is reinitialized (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
tompntn authored Apr 6, 2022
1 parent b49f73a commit a81c6c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions program/src/oracle/oracle.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ static uint64_t init_price( SolParameters *prm, SolAccountInfo *ka )
sptr->prev_slot_ = 0UL;
sptr->prev_price_ = 0L;
sptr->prev_conf_ = 0L;
sptr->prev_timestamp_ = 0L;
sol_memset( &sptr->twap_, 0, sizeof( pc_ema_t ) );
sol_memset( &sptr->twac_, 0, sizeof( pc_ema_t ) );
sol_memset( &sptr->agg_, 0, sizeof( pc_price_info_t ) );
Expand Down

0 comments on commit a81c6c0

Please sign in to comment.