@@ -385,7 +385,10 @@ mod tests {
385385 config. validation . allowed_tokens = vec ! [ ] ;
386386 let _ = update_config ( config) ;
387387
388- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
388+ let rpc_client = RpcClient :: new_with_commitment (
389+ "http://localhost:8899" . to_string ( ) ,
390+ CommitmentConfig :: confirmed ( ) ,
391+ ) ;
389392 let result = ConfigValidator :: validate ( & rpc_client) . await ;
390393 assert ! ( result. is_err( ) ) ;
391394 assert ! ( matches!( result. unwrap_err( ) , KoraError :: InternalServerError ( _) ) ) ;
@@ -419,7 +422,10 @@ mod tests {
419422 // Initialize global config
420423 let _ = update_config ( config) ;
421424
422- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
425+ let rpc_client = RpcClient :: new_with_commitment (
426+ "http://localhost:8899" . to_string ( ) ,
427+ CommitmentConfig :: confirmed ( ) ,
428+ ) ;
423429 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
424430 assert ! ( result. is_ok( ) ) ;
425431 let warnings = result. unwrap ( ) ;
@@ -467,7 +473,10 @@ mod tests {
467473 // Initialize global config
468474 let _ = update_config ( config) ;
469475
470- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
476+ let rpc_client = RpcClient :: new_with_commitment (
477+ "http://localhost:8899" . to_string ( ) ,
478+ CommitmentConfig :: confirmed ( ) ,
479+ ) ;
471480 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
472481 assert ! ( result. is_ok( ) ) ;
473482 let warnings = result. unwrap ( ) ;
@@ -504,7 +513,10 @@ mod tests {
504513 // Initialize global config
505514 let _ = update_config ( config) ;
506515
507- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
516+ let rpc_client = RpcClient :: new_with_commitment (
517+ "http://localhost:8899" . to_string ( ) ,
518+ CommitmentConfig :: confirmed ( ) ,
519+ ) ;
508520 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
509521 assert ! ( result. is_ok( ) ) ;
510522 let warnings = result. unwrap ( ) ;
@@ -539,7 +551,10 @@ mod tests {
539551
540552 let _ = update_config ( config) ;
541553
542- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
554+ let rpc_client = RpcClient :: new_with_commitment (
555+ "http://localhost:8899" . to_string ( ) ,
556+ CommitmentConfig :: confirmed ( ) ,
557+ ) ;
543558 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
544559 assert ! ( result. is_err( ) ) ;
545560 let errors = result. unwrap_err ( ) ;
@@ -579,7 +594,10 @@ mod tests {
579594
580595 let _ = update_config ( config) ;
581596
582- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
597+ let rpc_client = RpcClient :: new_with_commitment (
598+ "http://localhost:8899" . to_string ( ) ,
599+ CommitmentConfig :: confirmed ( ) ,
600+ ) ;
583601 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
584602 assert ! ( result. is_err( ) ) ;
585603 let errors = result. unwrap_err ( ) ;
@@ -616,7 +634,10 @@ mod tests {
616634
617635 let _ = update_config ( config) ;
618636
619- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
637+ let rpc_client = RpcClient :: new_with_commitment (
638+ "http://localhost:8899" . to_string ( ) ,
639+ CommitmentConfig :: confirmed ( ) ,
640+ ) ;
620641 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
621642 assert ! ( result. is_err( ) ) ;
622643 let errors = result. unwrap_err ( ) ;
@@ -661,7 +682,10 @@ mod tests {
661682
662683 let _ = update_config ( config) ;
663684
664- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
685+ let rpc_client = RpcClient :: new_with_commitment (
686+ "http://localhost:8899" . to_string ( ) ,
687+ CommitmentConfig :: confirmed ( ) ,
688+ ) ;
665689 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
666690 assert ! ( result. is_ok( ) ) ;
667691 let warnings = result. unwrap ( ) ;
@@ -693,7 +717,10 @@ mod tests {
693717
694718 let _ = update_config ( config) ;
695719
696- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
720+ let rpc_client = RpcClient :: new_with_commitment (
721+ "http://localhost:8899" . to_string ( ) ,
722+ CommitmentConfig :: confirmed ( ) ,
723+ ) ;
697724 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
698725 assert ! ( result. is_err( ) ) ;
699726 let errors = result. unwrap_err ( ) ;
@@ -980,7 +1007,10 @@ mod tests {
9801007
9811008 let _ = update_config ( config) ;
9821009
983- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
1010+ let rpc_client = RpcClient :: new_with_commitment (
1011+ "http://localhost:8899" . to_string ( ) ,
1012+ CommitmentConfig :: confirmed ( ) ,
1013+ ) ;
9841014 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
9851015 assert ! ( result. is_ok( ) ) ;
9861016 }
@@ -1011,7 +1041,10 @@ mod tests {
10111041
10121042 let _ = update_config ( config) ;
10131043
1014- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
1044+ let rpc_client = RpcClient :: new_with_commitment (
1045+ "http://localhost:8899" . to_string ( ) ,
1046+ CommitmentConfig :: confirmed ( ) ,
1047+ ) ;
10151048 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
10161049 assert ! ( result. is_err( ) ) ;
10171050 let errors = result. unwrap_err ( ) ;
@@ -1046,7 +1079,10 @@ mod tests {
10461079
10471080 let _ = update_config ( config) ;
10481081
1049- let rpc_client = RpcClient :: new ( "http://localhost:8899" . to_string ( ) ) ;
1082+ let rpc_client = RpcClient :: new_with_commitment (
1083+ "http://localhost:8899" . to_string ( ) ,
1084+ CommitmentConfig :: confirmed ( ) ,
1085+ ) ;
10501086 let result = ConfigValidator :: validate_with_result ( & rpc_client, true ) . await ;
10511087 assert ! ( result. is_err( ) ) ;
10521088 let errors = result. unwrap_err ( ) ;
0 commit comments