File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ pub use pyth_sdk::{
16
16
ProductIdentifier ,
17
17
} ;
18
18
19
- /// Maximum acceptable slot difference before price is considered to be stale.
20
- pub const MAX_SLOT_DIFFERENCE : u64 = 25 ;
19
+ /// Maximum valid slot period before price is considered to be stale.
20
+ pub const VALID_SLOT_PERIOD : u64 = 25 ;
21
21
22
22
/// Loads Pyth Price from the raw byte value of a Solana account.
23
23
pub fn load_price ( data : & [ u8 ] ) -> Result < Price , PythError > {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ use solana_program::{
27
27
} ;
28
28
29
29
#[ cfg( target_arch = "bpf" ) ]
30
- use crate :: MAX_SLOT_DIFFERENCE ;
30
+ use crate :: VALID_SLOT_PERIOD ;
31
31
32
32
use crate :: PythError ;
33
33
@@ -339,7 +339,7 @@ impl PriceAccount {
339
339
340
340
#[ cfg( target_arch = "bpf" ) ]
341
341
if matches ! ( status, PriceStatus :: Trading )
342
- && Clock :: get ( ) . unwrap ( ) . slot - self . agg . pub_slot > MAX_SLOT_DIFFERENCE
342
+ && Clock :: get ( ) . unwrap ( ) . slot - self . agg . pub_slot > VALID_SLOT_PERIOD
343
343
{
344
344
status = PriceStatus :: Unknown ;
345
345
}
You can’t perform that action at this time.
0 commit comments