Skip to content

Commit 1d40685

Browse files
mvinesmergify[bot]
authored andcommitted
Remove support for 1.1.0 version snapshots
1 parent 7db144c commit 1d40685

File tree

6 files changed

+9
-472
lines changed

6 files changed

+9
-472
lines changed

core/tests/bank_forks.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ mod tests {
5858
use std::{fs, path::PathBuf, sync::atomic::AtomicBool, sync::mpsc::channel, sync::Arc};
5959
use tempfile::TempDir;
6060

61-
DEFINE_SNAPSHOT_VERSION_PARAMETERIZED_TEST_FUNCTIONS!(V1_1_0);
6261
DEFINE_SNAPSHOT_VERSION_PARAMETERIZED_TEST_FUNCTIONS!(V1_2_0);
6362

6463
struct SnapshotTestConfig {

runtime/src/serde_snapshot.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use {
22
crate::{
33
accounts::Accounts,
4-
accounts_db::{
5-
AccountStorageEntry, AccountStorageStatus, AccountsDB, AppendVecId, BankHashInfo,
6-
},
4+
accounts_db::{AccountStorageEntry, AccountsDB, AppendVecId, BankHashInfo},
75
accounts_index::Ancestors,
86
append_vec::AppendVec,
97
bank::{Bank, BankFieldsToDeserialize, BankRc},
@@ -14,14 +12,11 @@ use {
1412
stakes::Stakes,
1513
},
1614
bincode,
17-
bincode::{config::Options, serialize_into, Error},
15+
bincode::{config::Options, Error},
1816
fs_extra::dir::CopyOptions,
1917
log::{info, warn},
2018
rand::{thread_rng, Rng},
21-
serde::{
22-
de::{DeserializeOwned, Visitor},
23-
Deserialize, Deserializer, Serialize, Serializer,
24-
},
19+
serde::{de::DeserializeOwned, Deserialize, Serialize},
2520
solana_sdk::{
2621
clock::{Epoch, Slot, UnixTimestamp},
2722
epoch_schedule::EpochSchedule,
@@ -33,10 +28,8 @@ use {
3328
pubkey::Pubkey,
3429
},
3530
std::{
36-
cmp::min,
3731
collections::HashMap,
38-
fmt::{Formatter, Result as FormatResult},
39-
io::{BufReader, BufWriter, Cursor, Read, Write},
32+
io::{BufReader, BufWriter, Read, Write},
4033
path::{Path, PathBuf},
4134
result::Result,
4235
sync::{atomic::Ordering, Arc},
@@ -49,12 +42,10 @@ use solana_sdk::abi_example::IgnoreAsHelper;
4942

5043
mod common;
5144
mod future;
52-
mod legacy;
5345
mod tests;
5446
mod utils;
5547

5648
use future::Context as TypeContextFuture;
57-
use legacy::Context as TypeContextLegacy;
5849
#[allow(unused_imports)]
5950
use utils::{serialize_iter_as_map, serialize_iter_as_seq, serialize_iter_as_tuple};
6051

@@ -67,7 +58,6 @@ pub(crate) use crate::accounts_db::{SnapshotStorage, SnapshotStorages};
6758
#[derive(Copy, Clone, Eq, PartialEq)]
6859
pub(crate) enum SerdeStyle {
6960
NEWER,
70-
OLDER,
7161
}
7262

7363
const MAX_STREAM_SIZE: u64 = 32 * 1024 * 1024 * 1024;
@@ -155,7 +145,6 @@ where
155145
}
156146
match serde_style {
157147
SerdeStyle::NEWER => INTO!(TypeContextFuture),
158-
SerdeStyle::OLDER => INTO!(TypeContextLegacy),
159148
}
160149
.map_err(|err| {
161150
warn!("bankrc_from_stream error: {:?}", err);
@@ -186,7 +175,6 @@ where
186175
}
187176
match serde_style {
188177
SerdeStyle::NEWER => INTO!(TypeContextFuture),
189-
SerdeStyle::OLDER => INTO!(TypeContextLegacy),
190178
}
191179
.map_err(|err| {
192180
warn!("bankrc_to_stream error: {:?}", err);

0 commit comments

Comments
 (0)