File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
pyth-sdk-solana/test-contract/tests Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
- #![ cfg( feature = "test-bpf" ) ] // Only runs on bpf, where solana programs run
2
-
3
1
use pyth_sdk_solana:: state:: {
4
2
AccountType ,
5
3
PriceAccount ,
@@ -44,9 +42,12 @@ async fn test_price_stale() {
44
42
// (its ~1-5). As the check will be 5u - 100u ~= 1e18 > MAX_SLOT_DIFFERENCE. It can only
45
43
// break when Solana slot in the test suite becomes between 100 and 100+MAX_SLOT_DIFFERENCE.
46
44
price. agg . pub_slot = 100 ;
47
- test_instr_exec_ok ( instruction:: price_status_check (
48
- & price,
49
- PriceStatus :: Unknown ,
50
- ) )
51
- . await ;
45
+
46
+ #[ cfg( feature = "test-bpf" ) ] // Only in BPF the clock check is performed
47
+ let expected_status = PriceStatus :: Unknown ;
48
+
49
+ #[ cfg( not( feature = "test-bpf" ) ) ]
50
+ let expected_status = PriceStatus :: Trading ;
51
+
52
+ test_instr_exec_ok ( instruction:: price_status_check ( & price, expected_status) ) . await ;
52
53
}
You can’t perform that action at this time.
0 commit comments