Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix struct size discrepancy by specifying enum representation #115 #117

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/pyth-sdk-solana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ jobs:
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: Install Solana Binaries
run: |
# Installing 1.17.x cli tools to have sbf instead of bpf. bpf does not work anymore.
sh -c "$(curl -sSfL https://release.solana.com/v1.18.1/install)"
sh -c "$(curl -sSfL https://release.solana.com/v1.18.4/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build BPF
run: cargo build-bpf --verbose
- name: Run BPF tests
run: cargo test-bpf --verbose
- name: Build SBF
run: cargo build-sbf --verbose
- name: Run SBF tests
run: cargo test-sbf --verbose
2 changes: 1 addition & 1 deletion pyth-sdk-solana/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-sdk-solana"
version = "0.10.0"
version = "0.10.1"
authors = ["Pyth Data Foundation"]
edition = "2018"
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions pyth-sdk-solana/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub const PROD_ATTR_SIZE: usize = PROD_ACCT_SIZE - PROD_HDR_SIZE;
serde::Serialize,
serde::Deserialize,
)]
#[repr(C)]
#[repr(u8)]
pub enum AccountType {
Unknown,
Mapping,
Expand All @@ -74,7 +74,7 @@ impl Default for AccountType {
serde::Serialize,
serde::Deserialize,
)]
#[repr(C)]
#[repr(u8)]
pub enum CorpAction {
NoCorpAct,
}
Expand All @@ -98,7 +98,7 @@ impl Default for CorpAction {
serde::Serialize,
serde::Deserialize,
)]
#[repr(C)]
#[repr(u8)]
pub enum PriceType {
Unknown,
Price,
Expand All @@ -122,7 +122,7 @@ impl Default for PriceType {
serde::Serialize,
serde::Deserialize,
)]
#[repr(C)]
#[repr(u8)]
pub enum PriceStatus {
/// The price feed is not currently updating for an unknown reason.
Unknown,
Expand Down
2 changes: 1 addition & 1 deletion pyth-sdk-solana/test-contract/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# This is only used for tests
[toolchain]
channel = "1.71.0"
channel = "1.76.0"
profile = "minimal"
Loading