Skip to content

Commit d9b915c

Browse files
authored
Reject prices in the future (#374)
1 parent 7d593d8 commit d9b915c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

program/rust/src/processor/upd_price.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ pub fn upd_price(
153153
// Check that publisher is publishing a more recent price
154154
pyth_assert(
155155
!is_component_update(cmd_args)?
156-
|| cmd_args.publishing_slot > latest_publisher_price.pub_slot_,
156+
|| (cmd_args.publishing_slot > latest_publisher_price.pub_slot_
157+
&& cmd_args.publishing_slot <= clock.slot),
157158
ProgramError::InvalidArgument,
158159
)?;
159160
}

0 commit comments

Comments
 (0)