Cleanup serde snapshot common.rs (#22854)
This commit is contained in:
parent
551c24da57
commit
22f6db2e4f
|
@ -44,7 +44,6 @@ use {
|
|||
},
|
||||
};
|
||||
|
||||
mod common;
|
||||
mod newer;
|
||||
mod storage;
|
||||
mod tests;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
use {super::*, std::collections::HashSet};
|
||||
|
||||
#[derive(Default, Clone, PartialEq, Debug, Deserialize, Serialize, AbiExample)]
|
||||
pub(crate) struct UnusedAccounts {
|
||||
unused1: HashSet<Pubkey>,
|
||||
unused2: HashSet<Pubkey>,
|
||||
unused3: HashMap<Pubkey, u64>,
|
||||
}
|
|
@ -1,17 +1,23 @@
|
|||
use {
|
||||
super::{
|
||||
common::UnusedAccounts,
|
||||
storage::SerializableAccountStorageEntry,
|
||||
utils::{serialize_iter_as_map, serialize_iter_as_seq},
|
||||
*,
|
||||
},
|
||||
crate::{ancestors::AncestorsForSerialization, stakes::StakesCache},
|
||||
solana_measure::measure::Measure,
|
||||
std::{cell::RefCell, sync::RwLock},
|
||||
std::{cell::RefCell, collections::HashSet, sync::RwLock},
|
||||
};
|
||||
|
||||
type AccountsDbFields = super::AccountsDbFields<SerializableAccountStorageEntry>;
|
||||
|
||||
#[derive(Default, Clone, PartialEq, Debug, Deserialize, Serialize, AbiExample)]
|
||||
struct UnusedAccounts {
|
||||
unused1: HashSet<Pubkey>,
|
||||
unused2: HashSet<Pubkey>,
|
||||
unused3: HashMap<Pubkey, u64>,
|
||||
}
|
||||
|
||||
// Deserializable version of Bank which need not be serializable,
|
||||
// because it's handled by SerializableVersionedBank.
|
||||
// So, sync fields with it!
|
||||
|
|
|
@ -305,7 +305,7 @@ mod test_bank_serialize {
|
|||
|
||||
// This some what long test harness is required to freeze the ABI of
|
||||
// Bank's serialization due to versioned nature
|
||||
#[frozen_abi(digest = "7PcarCw6gpw9Yw8xypdxQP24TFjLiaHyuDkq95cgwtte")]
|
||||
#[frozen_abi(digest = "HVyzePMkma8T54PymRW32FAgDXpSdom59K6RnPsCNJjj")]
|
||||
#[derive(Serialize, AbiExample)]
|
||||
pub struct BankAbiTestWrapperNewer {
|
||||
#[serde(serialize_with = "wrapper_newer")]
|
||||
|
|
Loading…
Reference in New Issue