1
1
use {
2
2
crate :: {
3
3
accounts:: Accounts ,
4
- accounts_db:: {
5
- AccountStorageEntry , AccountStorageStatus , AccountsDB , AppendVecId , BankHashInfo ,
6
- } ,
4
+ accounts_db:: { AccountStorageEntry , AccountsDB , AppendVecId , BankHashInfo } ,
7
5
accounts_index:: Ancestors ,
8
6
append_vec:: AppendVec ,
9
7
bank:: { Bank , BankFieldsToDeserialize , BankRc } ,
@@ -14,14 +12,11 @@ use {
14
12
stakes:: Stakes ,
15
13
} ,
16
14
bincode,
17
- bincode:: { config:: Options , serialize_into , Error } ,
15
+ bincode:: { config:: Options , Error } ,
18
16
fs_extra:: dir:: CopyOptions ,
19
17
log:: { info, warn} ,
20
18
rand:: { thread_rng, Rng } ,
21
- serde:: {
22
- de:: { DeserializeOwned , Visitor } ,
23
- Deserialize , Deserializer , Serialize , Serializer ,
24
- } ,
19
+ serde:: { de:: DeserializeOwned , Deserialize , Serialize } ,
25
20
solana_sdk:: {
26
21
clock:: { Epoch , Slot , UnixTimestamp } ,
27
22
epoch_schedule:: EpochSchedule ,
33
28
pubkey:: Pubkey ,
34
29
} ,
35
30
std:: {
36
- cmp:: min,
37
31
collections:: HashMap ,
38
- fmt:: { Formatter , Result as FormatResult } ,
39
- io:: { BufReader , BufWriter , Cursor , Read , Write } ,
32
+ io:: { BufReader , BufWriter , Read , Write } ,
40
33
path:: { Path , PathBuf } ,
41
34
result:: Result ,
42
35
sync:: { atomic:: Ordering , Arc } ,
@@ -49,12 +42,10 @@ use solana_sdk::abi_example::IgnoreAsHelper;
49
42
50
43
mod common;
51
44
mod future;
52
- mod legacy;
53
45
mod tests;
54
46
mod utils;
55
47
56
48
use future:: Context as TypeContextFuture ;
57
- use legacy:: Context as TypeContextLegacy ;
58
49
#[ allow( unused_imports) ]
59
50
use utils:: { serialize_iter_as_map, serialize_iter_as_seq, serialize_iter_as_tuple} ;
60
51
@@ -67,7 +58,6 @@ pub(crate) use crate::accounts_db::{SnapshotStorage, SnapshotStorages};
67
58
#[ derive( Copy , Clone , Eq , PartialEq ) ]
68
59
pub ( crate ) enum SerdeStyle {
69
60
NEWER ,
70
- OLDER ,
71
61
}
72
62
73
63
const MAX_STREAM_SIZE : u64 = 32 * 1024 * 1024 * 1024 ;
@@ -155,7 +145,6 @@ where
155
145
}
156
146
match serde_style {
157
147
SerdeStyle :: NEWER => INTO ! ( TypeContextFuture ) ,
158
- SerdeStyle :: OLDER => INTO ! ( TypeContextLegacy ) ,
159
148
}
160
149
. map_err ( |err| {
161
150
warn ! ( "bankrc_from_stream error: {:?}" , err) ;
@@ -186,7 +175,6 @@ where
186
175
}
187
176
match serde_style {
188
177
SerdeStyle :: NEWER => INTO ! ( TypeContextFuture ) ,
189
- SerdeStyle :: OLDER => INTO ! ( TypeContextLegacy ) ,
190
178
}
191
179
. map_err ( |err| {
192
180
warn ! ( "bankrc_to_stream error: {:?}" , err) ;
0 commit comments