File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
target_chains/stylus/contracts/pyth-receiver/src Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ impl PythReceiver {
391391 max_allowed_publish_time : u64 ,
392392 check_uniqueness : bool ,
393393 ) -> Result < Vec < PriceFeedReturn > , PythReceiverError > {
394+ // Check the first 4 bytes of the update_data_array for the magic header
394395 let update_data_array: & [ u8 ] = & update_data;
395396 if update_data_array. len ( ) < 4 {
396397 return Err ( PythReceiverError :: InvalidUpdateData ) ;
@@ -544,6 +545,8 @@ impl PythReceiver {
544545 <= max_age
545546 }
546547
548+ // Stylus doesn't provide a way to mock up the testing timestamp
549+ // so at the moment I'm using the testing trait to let me test old timestamps
547550 fn get_current_timestamp ( & self ) -> u64 {
548551 #[ cfg( test) ]
549552 {
You can’t perform that action at this time.
0 commit comments