@@ -43,7 +43,6 @@ use yellowstone_grpc_proto::geyser::{
4343use yellowstone_grpc_proto:: tonic:: codec:: CompressionEncoding ;
4444
4545const MAX_GRPC_ACCOUNT_SUBSCRIPTIONS : usize = 100 ;
46- const MAX_GMA_ACCOUNTS : usize = 100 ;
4746
4847// limit number of concurrent gMA/gPA requests
4948const MAX_PARALLEL_HEAVY_RPC_REQUESTS : usize = 4 ;
@@ -72,6 +71,7 @@ pub async fn feed_data_geyser(
7271 sender : async_channel:: Sender < SourceMessage > ,
7372) -> anyhow:: Result < ( ) > {
7473 let use_compression = snapshot_config. rpc_support_compression . unwrap_or ( false ) ;
74+ let number_of_accounts_per_gma = snapshot_config. number_of_accounts_per_gma . unwrap_or ( 100 ) ;
7575 let grpc_connection_string = match & grpc_config. connection_string . chars ( ) . next ( ) . unwrap ( ) {
7676 '$' => env:: var ( & grpc_config. connection_string [ 1 ..] )
7777 . expect ( "reading connection string from env" ) ,
@@ -336,7 +336,7 @@ pub async fn feed_data_geyser(
336336 let permits_parallel_rpc_requests = Arc :: new( Semaphore :: new( MAX_PARALLEL_HEAVY_RPC_REQUESTS ) ) ;
337337
338338 info!( "Requesting snapshot from gMA for {} filter accounts" , accounts_filter. len( ) ) ;
339- for pubkey_chunk in accounts_filter. iter( ) . chunks( MAX_GMA_ACCOUNTS ) . into_iter( ) {
339+ for pubkey_chunk in accounts_filter. iter( ) . chunks( number_of_accounts_per_gma ) . into_iter( ) {
340340 let rpc_http_url = snapshot_rpc_http_url. clone( ) ;
341341 let account_ids = pubkey_chunk. cloned( ) . collect_vec( ) ;
342342 let sender = snapshot_gma_sender. clone( ) ;
0 commit comments