Fold bank serialisation into serde snapshot (#10581)
* Move bank (de)serialisation logic from bank and snapshot_utils to serde_snapshot. Add sanity assertions between genesis config and bank fields on deserialisation. Atomically update atomic bool in quote_for_specialization_detection(). Use same genesis config when restoring snapshots in test cases. * Tidy up namings and duplicate structs to version * Apply struct renames to tests * Update abi hashes Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5c86766fb2
commit
ed5a2f2a90
@ -78,8 +78,11 @@ fn quote_for_specialization_detection() -> TokenStream2 {
|
||||
std::sync::atomic::AtomicBool::new(false);
|
||||
}
|
||||
|
||||
if !SPECIALIZATION_DETECTOR_INJECTED.load(std::sync::atomic::Ordering::Relaxed) {
|
||||
SPECIALIZATION_DETECTOR_INJECTED.store(true, std::sync::atomic::Ordering::Relaxed);
|
||||
if !SPECIALIZATION_DETECTOR_INJECTED.compare_and_swap(
|
||||
false,
|
||||
true,
|
||||
std::sync::atomic::Ordering::AcqRel,
|
||||
) {
|
||||
quote! {
|
||||
mod specialization_detector {
|
||||
trait SpecializedTrait {
|
||||
|
Reference in New Issue
Block a user