Skip to content

Commit 75650a0

Browse files
committed
chore: added some suggesttions
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
1 parent 2a2bd41 commit 75650a0

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

src/hiero_sdk_python/transaction/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def is_signed_by(self, public_key):
423423
return True
424424
return False
425425

426-
def build_transaction_body(self) -> transaction_pb2.Transaction:
426+
def build_transaction_body(self) -> transaction_pb2.TransactionBody:
427427
"""
428428
Abstract method to build the transaction body.
429429

tests/integration/file_append_transaction_e2e_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,13 @@ def test_file_append_chuck_transaction_can_execute_with_manual_freeze(env):
330330
.set_file_id(file_id)
331331
.set_chunk_size(1024)
332332
.set_contents(content)
333-
.freeze_with(env.client)
333+
.set_transaction_id(TransactionId.generate(env.client.operator_account_id))
334+
.set_node_account_id(AccountId(0,0,3))
335+
.freeze()
334336
)
335337

336-
# tx.sign(env.client.operator_private_key)
338+
tx.sign(env.client.operator_private_key)
337339

338-
print(tx.get_required_chunks())
339340
receipt = tx.execute(env.client)
340341

341342
assert receipt.status == ResponseCode.SUCCESS

tests/unit/mock_server.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ def _find_free_port():
134134
port = s.getsockname()[1]
135135

136136
# If we get the tls port 50212 port skip it
137-
if port in [50212]:
137+
if port == 50212:
138138
return port + 1
139-
140-
return port
139+
140+
return port
141141

142142

143143
class RealRpcError(grpc.RpcError):
@@ -173,17 +173,15 @@ def mock_hedera_servers(response_sequences):
173173
nodes = []
174174
for i, server in enumerate(servers):
175175
node = _Node(AccountId(0, 0, 3 + i), server.address, None)
176-
177-
# force insecure channel
178-
node._get_channel = lambda: _Channel(
179-
grpc.insecure_channel(str(node._address))
180-
)
181-
182176
nodes.append(node)
183177

184178
# Create network and client
185179
network = Network(nodes=nodes)
186180
client = Client(network)
181+
182+
for node in client.network.nodes:
183+
node._address = node._address._to_insecure()
184+
187185
client.logger.set_level(LogLevel.DISABLED)
188186
# Set the operator
189187
key = PrivateKey.generate()

0 commit comments

Comments
 (0)