Skip to content

Commit fe686ba

Browse files
committed
nit
1 parent a9b8846 commit fe686ba

File tree

1 file changed

+3
-0
lines changed
  • target_chains/stylus/contracts/pyth-receiver/src

1 file changed

+3
-0
lines changed

target_chains/stylus/contracts/pyth-receiver/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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
{

0 commit comments

Comments
 (0)