Skip to content

Commit 4cfa63e

Browse files
authored
Merge pull request #2807 from opentensor/fix/roman/blocks_since_last_update
fix return `blocks_since_last_update`
2 parents de7d98f + 6751f1b commit 4cfa63e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bittensor/core/subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def blocks_since_last_update(self, netuid: int, uid: int) -> Optional[int]:
399399
exist.
400400
"""
401401
call = self.get_hyperparameter(param_name="LastUpdate", netuid=netuid)
402-
return None if call is None else (self.get_current_block() - int(call[uid]))
402+
return None if not call else (self.get_current_block() - int(call[uid]))
403403

404404
def bonds(
405405
self, netuid: int, block: Optional[int] = None

0 commit comments

Comments
 (0)