@@ -22,14 +22,14 @@ use miden_node_proto::{
22
22
} ;
23
23
use miden_node_utils:: tracing:: grpc:: OtelInterceptor ;
24
24
use miden_objects:: {
25
- Digest , MAX_NUM_FOREIGN_ACCOUNTS , MIN_PROOF_SECURITY_LEVEL , account :: AccountId ,
26
- crypto :: hash :: rpo :: RpoDigest , transaction :: ProvenTransaction , utils :: serde :: Deserializable ,
25
+ account :: AccountId , crypto :: hash :: rpo :: RpoDigest , transaction :: ProvenTransaction ,
26
+ utils :: serde :: Deserializable , Digest , MAX_NUM_FOREIGN_ACCOUNTS , MIN_PROOF_SECURITY_LEVEL ,
27
27
} ;
28
28
use miden_tx:: TransactionVerifier ;
29
29
use tonic:: {
30
- Request , Response , Status ,
31
30
service:: interceptor:: InterceptedService ,
32
31
transport:: { Channel , Error } ,
32
+ Request , Response , Status ,
33
33
} ;
34
34
use tracing:: { debug, info, instrument} ;
35
35
@@ -52,15 +52,13 @@ impl RpcService {
52
52
store_address : SocketAddr ,
53
53
block_producer_address : SocketAddr ,
54
54
) -> Result < Self , Error > {
55
- let channel = tonic:: transport:: Endpoint :: try_from ( store_address. to_string ( ) ) ?
56
- . connect ( )
57
- . await ?;
55
+ let store_url = format ! ( "http://{store_address}" ) ;
56
+ let channel = tonic:: transport:: Endpoint :: try_from ( store_url) ?. connect ( ) . await ?;
58
57
let store = store_client:: ApiClient :: with_interceptor ( channel, OtelInterceptor ) ;
59
58
info ! ( target: COMPONENT , store_endpoint = %store_address, "Store client initialized" ) ;
60
59
61
- let channel = tonic:: transport:: Endpoint :: try_from ( block_producer_address. to_string ( ) ) ?
62
- . connect ( )
63
- . await ?;
60
+ let block_producer_url = format ! ( "http://{block_producer_address}" ) ;
61
+ let channel = tonic:: transport:: Endpoint :: try_from ( block_producer_url) ?. connect ( ) . await ?;
64
62
let block_producer =
65
63
block_producer_client:: ApiClient :: with_interceptor ( channel, OtelInterceptor ) ;
66
64
0 commit comments