Skip to content

Commit 0caf78d

Browse files
committed
feat: updated client to use tls for mirror node for specific port
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
1 parent 6b00753 commit 0caf78d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hiero_sdk_python/client/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ def _init_mirror_stub(self) -> None:
5353
We now use self.network.get_mirror_address() for a configurable mirror address.
5454
"""
5555
mirror_address = self.network.get_mirror_address()
56-
self.mirror_channel = grpc.secure_channel(mirror_address, grpc.ssl_channel_credentials())
56+
if mirror_address.endswith(':50212') or mirror_address.endswith(':443'):
57+
self.mirror_channel = grpc.secure_channel(mirror_address, grpc.ssl_channel_credentials())
58+
else:
59+
self.mirror_channel = grpc.insecure_channel(mirror_address)
5760
self.mirror_stub = mirror_consensus_grpc.ConsensusServiceStub(self.mirror_channel)
5861

5962
def set_operator(self, account_id: AccountId, private_key: PrivateKey) -> None:

0 commit comments

Comments
 (0)