* Remove frozen ABI modules from solana-sdk
(cherry picked from commit 6858950f76
)
# Conflicts:
# Cargo.lock
# core/Cargo.toml
# frozen-abi/macro/Cargo.toml
# programs/bpf/Cargo.lock
# programs/stake/Cargo.toml
# programs/vote/Cargo.toml
# runtime/Cargo.toml
# sdk/Cargo.toml
# version/Cargo.toml
* rebase
* fix broken ci (#13039)
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
@@ -449,7 +449,7 @@ fn make_min_priority_thread_pool() -> ThreadPool {
|
||||
}
|
||||
|
||||
#[cfg(all(test, RUSTC_WITH_SPECIALIZATION))]
|
||||
impl solana_sdk::abi_example::AbiExample for AccountsDB {
|
||||
impl solana_frozen_abi::abi_example::AbiExample for AccountsDB {
|
||||
fn example() -> Self {
|
||||
let accounts_db = AccountsDB::new_single();
|
||||
let key = Pubkey::default();
|
||||
|
@@ -330,7 +330,7 @@ pub struct BankRc {
|
||||
}
|
||||
|
||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||
use solana_sdk::abi_example::AbiExample;
|
||||
use solana_frozen_abi::abi_example::AbiExample;
|
||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||
impl AbiExample for BankRc {
|
||||
fn example() -> Self {
|
||||
|
@@ -44,7 +44,7 @@ extern crate solana_metrics;
|
||||
extern crate serde_derive;
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana_sdk_macro_frozen_abi;
|
||||
extern crate solana_frozen_abi_macro;
|
||||
|
||||
extern crate fs_extra;
|
||||
extern crate tempfile;
|
||||
|
@@ -387,7 +387,7 @@ impl Clone for MessageProcessor {
|
||||
}
|
||||
|
||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||
impl ::solana_sdk::abi_example::AbiExample for MessageProcessor {
|
||||
impl ::solana_frozen_abi::abi_example::AbiExample for MessageProcessor {
|
||||
fn example() -> Self {
|
||||
// MessageProcessor's fields are #[serde(skip)]-ed and not Serialize
|
||||
// so, just rely on Default anyway.
|
||||
|
@@ -39,7 +39,7 @@ use {
|
||||
};
|
||||
|
||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||
use solana_sdk::abi_example::IgnoreAsHelper;
|
||||
use solana_frozen_abi::abi_example::IgnoreAsHelper;
|
||||
|
||||
mod common;
|
||||
mod future;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use super::common::UnusedAccounts;
|
||||
#[cfg(all(test, RUSTC_WITH_SPECIALIZATION))]
|
||||
use solana_sdk::abi_example::IgnoreAsHelper;
|
||||
use solana_frozen_abi::abi_example::IgnoreAsHelper;
|
||||
use {super::*, solana_measure::measure::Measure, std::cell::RefCell};
|
||||
|
||||
type AccountsDbFields = super::AccountsDbFields<SerializableAccountStorageEntry>;
|
||||
@@ -13,7 +13,7 @@ pub(super) struct SerializableAccountStorageEntry {
|
||||
}
|
||||
|
||||
#[cfg(all(test, RUSTC_WITH_SPECIALIZATION))]
|
||||
impl solana_sdk::abi_example::IgnoreAsHelper for SerializableAccountStorageEntry {}
|
||||
impl solana_frozen_abi::abi_example::IgnoreAsHelper for SerializableAccountStorageEntry {}
|
||||
|
||||
impl From<&AccountStorageEntry> for SerializableAccountStorageEntry {
|
||||
fn from(rhs: &AccountStorageEntry) -> Self {
|
||||
|
@@ -262,7 +262,7 @@ mod test_bank_serialize {
|
||||
|
||||
// These some what long test harness is required to freeze the ABI of
|
||||
// Bank's serialization due to versioned nature
|
||||
#[frozen_abi(digest = "5rd8RyVSLH3hm12xJDVCJWgc1gyqb4Ukt2hJLJNfsB5v")]
|
||||
#[frozen_abi(digest = "ULV2jDndxR3JB677ayyjaamtAcZ24q75tCkHS2bKVoy")]
|
||||
#[derive(Serialize, AbiExample)]
|
||||
pub struct BankAbiTestWrapperFuture {
|
||||
#[serde(serialize_with = "wrapper_future")]
|
||||
|
@@ -3,7 +3,7 @@ use serde::{
|
||||
Serialize, Serializer,
|
||||
};
|
||||
#[cfg(all(test, RUSTC_WITH_SPECIALIZATION))]
|
||||
use solana_sdk::abi_example::IgnoreAsHelper;
|
||||
use solana_frozen_abi::abi_example::IgnoreAsHelper;
|
||||
|
||||
// consumes an iterator and returns an object that will serialize as a serde seq
|
||||
#[allow(dead_code)]
|
||||
|
Reference in New Issue
Block a user