@@ -13,15 +13,15 @@ use crate::StdResult;
1313
1414/// [Block streamer][BlockStreamer] that streams blocks immutable files per immutable files
1515pub struct ImmutableBlockStreamer {
16- remaining_immutables : VecDeque < ImmutableFile > ,
16+ remaining_immutable_files : VecDeque < ImmutableFile > ,
1717 allow_unparsable_block : bool ,
1818 logger : Logger ,
1919}
2020
2121#[ async_trait]
2222impl BlockStreamer for ImmutableBlockStreamer {
2323 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 ( ) {
2525 Some ( immutable_file) => {
2626 debug ! (
2727 self . logger,
@@ -52,7 +52,7 @@ impl ImmutableBlockStreamer {
5252 logger : Logger ,
5353 ) -> Self {
5454 Self {
55- remaining_immutables : VecDeque :: from ( immutables_chunk_to_stream) ,
55+ remaining_immutable_files : VecDeque :: from ( immutables_chunk_to_stream) ,
5656 allow_unparsable_block,
5757 logger,
5858 }
@@ -148,19 +148,19 @@ mod tests {
148148
149149 let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
150150 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( ) ) ,
152152 Some ( immutable_files[ 0 ] . 1 )
153153 ) ;
154154
155155 let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
156156 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( ) ) ,
158158 Some ( immutable_files[ 1 ] . 1 )
159159 ) ;
160160
161161 let immutable_blocks = streamer. poll_next ( ) . await . unwrap ( ) ;
162162 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( ) ) ,
164164 Some ( immutable_files[ 2 ] . 1 )
165165 ) ;
166166
0 commit comments