Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program * Update account-decoder * Update cli and runtime * Update all other parts * Commit Cargo.lock changes in programs/bpf * Update cli stake instruction import * Allow integer arithmetic * Update ABI digest * Bump rust mem instruction count * Remove useless structs * Move stake::id() -> stake::program::id() * Re-export from solana_sdk and mark deprecated * Address feedback * Run cargo fmt
This commit is contained in:
@@ -9,6 +9,7 @@ use solana_sdk::{
|
||||
account::{Account, AccountSharedData},
|
||||
pubkey::Pubkey,
|
||||
short_vec,
|
||||
stake::config::Config as StakeConfig,
|
||||
};
|
||||
|
||||
solana_sdk::declare_id!("Config1111111111111111111111111111111111111");
|
||||
@@ -18,6 +19,13 @@ pub trait ConfigState: serde::Serialize + Default {
|
||||
fn max_space() -> u64;
|
||||
}
|
||||
|
||||
// TODO move ConfigState into `solana_program` to implement trait locally
|
||||
impl ConfigState for StakeConfig {
|
||||
fn max_space() -> u64 {
|
||||
serialized_size(&StakeConfig::default()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
/// A collection of keys to be stored in Config account data.
|
||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
||||
pub struct ConfigKeys {
|
||||
|
Reference in New Issue
Block a user