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 {
391
391
max_allowed_publish_time : u64 ,
392
392
check_uniqueness : bool ,
393
393
) -> Result < Vec < PriceFeedReturn > , PythReceiverError > {
394
+ // Check the first 4 bytes of the update_data_array for the magic header
394
395
let update_data_array: & [ u8 ] = & update_data;
395
396
if update_data_array. len ( ) < 4 {
396
397
return Err ( PythReceiverError :: InvalidUpdateData ) ;
@@ -544,6 +545,8 @@ impl PythReceiver {
544
545
<= max_age
545
546
}
546
547
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
547
550
fn get_current_timestamp ( & self ) -> u64 {
548
551
#[ cfg( test) ]
549
552
{
You can’t perform that action at this time.
0 commit comments