File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1267,7 +1267,7 @@ async def preprocess(self, request: "Request") -> "Synapse":
1267
1267
# Fills the local axon information into the synapse.
1268
1268
synapse .axon .__dict__ .update (
1269
1269
{
1270
- "version" : str (version_as_int ),
1270
+ "version" : int (version_as_int ),
1271
1271
"uuid" : str (self .axon .uuid ),
1272
1272
"nonce" : time .time_ns (),
1273
1273
"status_code" : 100 ,
@@ -1276,7 +1276,7 @@ async def preprocess(self, request: "Request") -> "Synapse":
1276
1276
1277
1277
# Fills the dendrite information into the synapse.
1278
1278
synapse .dendrite .__dict__ .update (
1279
- {"port" : str (request .client .port ), "ip" : str (request .client .host )} # type: ignore
1279
+ {"port" : int (request .client .port ), "ip" : str (request .client .host )} # type: ignore
1280
1280
)
1281
1281
1282
1282
# Signs the synapse from the axon side using the wallet hotkey.
Original file line number Diff line number Diff line change @@ -493,15 +493,15 @@ async def test_preprocess(self):
493
493
synapse = await self .axon_middleware .preprocess (request )
494
494
495
495
# Check if the preprocess function fills the axon information into the synapse
496
- assert synapse .axon .version == str ( version_as_int )
496
+ assert synapse .axon .version == version_as_int
497
497
assert synapse .axon .uuid == "1234"
498
498
assert synapse .axon .nonce is not None
499
499
assert synapse .axon .status_message is None
500
500
assert synapse .axon .status_code == 100
501
501
assert synapse .axon .signature == "0xaabbccdd"
502
502
503
503
# Check if the preprocess function fills the dendrite information into the synapse
504
- assert synapse .dendrite .port == " 5000"
504
+ assert synapse .dendrite .port == 5000
505
505
assert synapse .dendrite .ip == "192.168.0.1"
506
506
507
507
# Check if the preprocess function sets the request name correctly
You can’t perform that action at this time.
0 commit comments