@@ -13,15 +13,15 @@ use crate::StdResult;
13
13
14
14
/// [Block streamer][BlockStreamer] that streams blocks immutable files per immutable files
15
15
pub struct ImmutableBlockStreamer {
16
- remaining_immutables : VecDeque < ImmutableFile > ,
16
+ remaining_immutable_files : VecDeque < ImmutableFile > ,
17
17
allow_unparsable_block : bool ,
18
18
logger : Logger ,
19
19
}
20
20
21
21
#[ async_trait]
22
22
impl BlockStreamer for ImmutableBlockStreamer {
23
23
async fn poll_next ( & mut self ) -> StdResult < Option < Vec < ScannedBlock > > > {
24
- match & self . remaining_immutables . pop_front ( ) {
24
+ match & self . remaining_immutable_files . pop_front ( ) {
25
25
Some ( immutable_file) => {
26
26
debug ! (
27
27
self . logger,
@@ -52,7 +52,7 @@ impl ImmutableBlockStreamer {
52
52
logger : Logger ,
53
53
) -> Self {
54
54
Self {
55
- remaining_immutables : VecDeque :: from ( immutables_chunk_to_stream) ,
55
+ remaining_immutable_files : VecDeque :: from ( immutables_chunk_to_stream) ,
56
56
allow_unparsable_block,
57
57
logger,
58
58
}
@@ -148,19 +148,19 @@ mod tests {
148
148
149
149
let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
150
150
assert_eq ! (
151
- immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transaction_len ( ) ) . sum( ) ) ,
151
+ immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transactions_len ( ) ) . sum( ) ) ,
152
152
Some ( immutable_files[ 0 ] . 1 )
153
153
) ;
154
154
155
155
let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
156
156
assert_eq ! (
157
- immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transaction_len ( ) ) . sum( ) ) ,
157
+ immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transactions_len ( ) ) . sum( ) ) ,
158
158
Some ( immutable_files[ 1 ] . 1 )
159
159
) ;
160
160
161
161
let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
162
162
assert_eq ! (
163
- immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transaction_len ( ) ) . sum( ) ) ,
163
+ immutable_blocks. map( |b| b. into_iter( ) . map( |b| b. transactions_len ( ) ) . sum( ) ) ,
164
164
Some ( immutable_files[ 2 ] . 1 )
165
165
) ;
166
166
0 commit comments