File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ pub fn add_price(
85
85
price_data. min_pub_ = PRICE_ACCOUNT_DEFAULT_MIN_PUB ;
86
86
price_data. feed_index = reserve_new_price_feed_index ( permissions_account) ?;
87
87
88
- if !cfg ! ( feature = "no-default-accumulator_v2 " ) {
88
+ if !cfg ! ( feature = "no-default-accumulator-v2 " ) {
89
89
price_data
90
90
. flags
91
91
. insert ( PriceAccountFlags :: ACCUMULATOR_V2 | PriceAccountFlags :: MESSAGE_BUFFER_CLEARED ) ;
Original file line number Diff line number Diff line change @@ -103,13 +103,13 @@ async fn test_publish() {
103
103
assert_eq ! ( price_data. comp_[ 0 ] . latest_. status_, PC_STATUS_UNKNOWN ) ;
104
104
105
105
if cfg ! ( feature = "no-default-accumulator-v2" ) {
106
- assert_eq ! ( price_data. agg_. price_, 150 ) ;
107
- assert_eq ! ( price_data. agg_. conf_, 7 ) ;
108
- assert_eq ! ( price_data. agg_. status_, PC_STATUS_TRADING ) ;
106
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. price_, 150 ) ;
107
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. conf_, 7 ) ;
108
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. status_, PC_STATUS_TRADING ) ;
109
109
} else {
110
- assert_eq ! ( price_data. agg_. price_, 0 ) ;
111
- assert_eq ! ( price_data. agg_. conf_, 0 ) ;
112
- assert_eq ! ( price_data. agg_. status_, PC_STATUS_UNKNOWN ) ;
110
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. price_, 0 ) ;
111
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. conf_, 0 ) ;
112
+ assert_eq ! ( price_data. comp_ [ 0 ] . agg_. status_, PC_STATUS_UNKNOWN ) ;
113
113
}
114
114
}
115
115
}
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ mkdir -p target/pyth/pythnet/
28
28
mv target/deploy/pyth_oracle.so target/pyth/pythnet/pyth_oracle_pythnet.so
29
29
30
30
# Re-run tests affected by features
31
- cargo-test-bpf -- --features no-default-accumulator-v2
32
31
cargo-build-bpf -- --locked -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --features no-default-accumulator-v2
32
+ cargo test --locked --features no-default-accumulator-v2
33
33
sha256sum ./target/** /* .so
34
34
echo " Checking size of pyth_oracle.so for pythnet with no accumulator"
35
35
./scripts/check-size.sh 88429
You can’t perform that action at this time.
0 commit comments