Spaces:
Sleeping
Sleeping
Don't clear weights if unsuccessful sync
Browse files- src/chain_data.py +1 -1
src/chain_data.py
CHANGED
|
@@ -84,7 +84,6 @@ def query_subtensor(storage_keys: list[StorageKey], block: int) -> list:
|
|
| 84 |
|
| 85 |
|
| 86 |
def fetch_weights(block: int):
|
| 87 |
-
WEIGHTS_BY_MINER.clear()
|
| 88 |
storage_keys: list[StorageKey] = []
|
| 89 |
for hotkey, neuron in get_neurons().items():
|
| 90 |
if not neuron.validator_permit: continue
|
|
@@ -95,6 +94,7 @@ def fetch_weights(block: int):
|
|
| 95 |
))
|
| 96 |
|
| 97 |
weights = query_subtensor(storage_keys, block)
|
|
|
|
| 98 |
|
| 99 |
for hotkey, neuron in get_neurons().items():
|
| 100 |
for storage, validator_weights in weights:
|
|
|
|
| 84 |
|
| 85 |
|
| 86 |
def fetch_weights(block: int):
|
|
|
|
| 87 |
storage_keys: list[StorageKey] = []
|
| 88 |
for hotkey, neuron in get_neurons().items():
|
| 89 |
if not neuron.validator_permit: continue
|
|
|
|
| 94 |
))
|
| 95 |
|
| 96 |
weights = query_subtensor(storage_keys, block)
|
| 97 |
+
WEIGHTS_BY_MINER.clear()
|
| 98 |
|
| 99 |
for hotkey, neuron in get_neurons().items():
|
| 100 |
for storage, validator_weights in weights:
|