opentensor / subtensor

Bittensor Blockchain Layer
The Unlicense
130 stars 143 forks source link

Swap hot and cold keys in SubStake map #416

Closed gztensor closed 3 months ago

gztensor commented 3 months ago

Description

Searching for owning coldkey by hotkey is O(1), so we don't need hotkey to be the first key in SubStake map. This PR allows us to calculate TotalColdkeyStake with O(1) complexity.

Related Issue(s)

n/a

Type of Change

Breaking Change

n/a

Checklist

Screenshots (if applicable)

n/a

Additional Notes

n/a