Skip to content

Commit 4f8f641

Browse files
committed
ignore zero prices, which are currently considered an error in submission
1 parent cb599a1 commit 4f8f641

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

program/src/oracle/upd_aggregate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ static void upd_aggregate( pc_price_t *ptr, uint64_t slot )
301301
int64_t slot_diff = slot - iptr->agg_.pub_slot_;
302302
if ( iptr->agg_.status_ == PC_STATUS_TRADING &&
303303
iptr->agg_.conf_ != 0UL &&
304+
iptr->agg_.price_ != 0L &&
304305
slot_diff >= 0 && slot_diff <= PC_MAX_SEND_LATENCY ) {
305306
int64_t ipx = iptr->agg_.price_;
306307
uint32_t j = numa++;

pyth/tests/qset/3.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"exponent":-3,"price":0,"conf":1000}
1+
{"exponent":-3,"price":0,"conf":0}

pyth/tests/qset/31.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"exponent":-8,"price":42089,"conf":2164588150000}
1+
{"exponent":-8,"price":4329782800000,"conf":2616650000}

pyth/tests/qset/32.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"exponent":-8,"price":4329782800000,"conf":2616650000}
1+
{"exponent":-8,"price":4329847900000,"conf":3031550000}

0 commit comments

Comments
 (0)