Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions bittensor/core/chain_data/axon_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,17 @@ def ip_str(self) -> str:
return networking.ip__str__(self.ip_type, self.ip, self.port)

def __eq__(self, other: "AxonInfo"):
if other is None:
if other is None or not isinstance(other, AxonInfo):
return False

if (
return (
self.version == other.version
and self.ip == other.ip
and self.port == other.port
and self.ip_type == other.ip_type
and self.coldkey == other.coldkey
and self.hotkey == other.hotkey
):
return True

return False
)

def __str__(self):
return f"AxonInfo( {self.ip_str()}, {self.hotkey}, {self.coldkey}, {self.version} )"
Expand Down