diff --git a/pythnet/pythnet_sdk/Cargo.toml b/pythnet/pythnet_sdk/Cargo.toml index 675e3e655a..603b721dbc 100644 --- a/pythnet/pythnet_sdk/Cargo.toml +++ b/pythnet/pythnet_sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pythnet-sdk" -version = "2.3.0" +version = "2.4.0" description = "Pyth Runtime for Solana" authors = ["Pyth Data Association"] repository = "https://github.com/pyth-network/pythnet" @@ -17,7 +17,7 @@ solana-program = ["dep:solana-program", "dep:anchor-lang"] [dependencies] bincode = "1.3.1" -borsh = "0.10.3" +borsh = { version = "1.2.1", features = ["unstable__schema"] } bytemuck = { version = "1.11.0", features = ["derive"] } byteorder = "1.4.3" fast-math = "0.1" diff --git a/pythnet/pythnet_sdk/src/accumulators/merkle.rs b/pythnet/pythnet_sdk/src/accumulators/merkle.rs index 054a0ff137..f1d8303f36 100644 --- a/pythnet/pythnet_sdk/src/accumulators/merkle.rs +++ b/pythnet/pythnet_sdk/src/accumulators/merkle.rs @@ -73,7 +73,7 @@ pub struct MerkleTree { pub root: MerkleRoot, #[serde(skip)] - #[borsh_skip] + #[borsh(skip)] pub nodes: Vec, } @@ -336,11 +336,11 @@ mod test { ema: 50, ema_expo: 1, }; - let item_a = borsh::BorshSerialize::try_to_vec(&price_account_a).unwrap(); + let item_a = borsh::to_vec(&price_account_a).unwrap(); let mut price_only_b = PriceOnly::from(price_account_a); price_only_b.price = 200; - let item_b = BorshSerialize::try_to_vec(&price_only_b).unwrap(); + let item_b = borsh::to_vec(&price_only_b).unwrap(); let item_c = 2usize.to_be_bytes(); let item_d = 88usize.to_be_bytes();