From d01280df77fd3b5f7851dc749f36d9240db0ce13 Mon Sep 17 00:00:00 2001 From: Arrowana Date: Wed, 13 Sep 2023 22:43:29 +1000 Subject: [PATCH] change deps --- program/Cargo.toml | 2 +- program/src/stake_account.rs | 7 ++++--- program/src/state.rs | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/program/Cargo.toml b/program/Cargo.toml index 73abc4b24..af226557d 100644 --- a/program/Cargo.toml +++ b/program/Cargo.toml @@ -12,7 +12,7 @@ no-entrypoint = [] test-bpf = [] [dependencies] -borsh = "0.9.3" +borsh = "0.9" num-derive = "0.3" num-traits = "0.2" serde = "1.0.137" diff --git a/program/src/stake_account.rs b/program/src/stake_account.rs index 880daac19..f470446bc 100644 --- a/program/src/stake_account.rs +++ b/program/src/stake_account.rs @@ -194,9 +194,10 @@ impl StakeAccount { let target_epoch = clock.epoch; let history = Some(stake_history); - let mut state = stake - .delegation - .stake_activating_and_deactivating(target_epoch, history); + let mut state = + stake + .delegation + .stake_activating_and_deactivating(target_epoch, history, None); // `stake_activating_and_deactivating` counts deactivating stake both as // part of the active lamports, and as part of the deactivating diff --git a/program/src/state.rs b/program/src/state.rs index bbdd11792..b6acebd0a 100644 --- a/program/src/state.rs +++ b/program/src/state.rs @@ -8,7 +8,7 @@ use std::ops::Range; use serde::Serialize; use borsh::{BorshDeserialize, BorshSchema, BorshSerialize}; -use solana_program::borsh::{get_instance_packed_len, try_from_slice_unchecked}; +use solana_program::borsh0_10; use solana_program::clock::Clock; use solana_program::{ account_info::AccountInfo, clock::Epoch, entrypoint::ProgramResult, msg, @@ -242,7 +242,7 @@ impl Lido { ); return Err(LidoError::InvalidOwner.into()); } - let lido = try_from_slice_unchecked::(&lido.data.borrow())?; + let lido = borsh0_10::try_from_slice_unchecked::(&lido.data.borrow())?; Ok(lido) } @@ -256,7 +256,7 @@ impl Lido { maintainers: Maintainers::new_fill_default(max_maintainers), ..Default::default() }; - get_instance_packed_len(&lido_instance).unwrap() + borsh0_10::get_instance_packed_len(&lido_instance).unwrap() } /// Confirm that the given account is Solido's stSOL mint.