Skip to content

Commit

Permalink
wallet: Drop unused WalletStateManager.get_derivation_index (#11110)
Browse files Browse the repository at this point in the history
  • Loading branch information
xdustinface authored and emlowe committed Apr 21, 2022
1 parent 4d4de07 commit e8276f7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions chia/wallet/wallet_state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,6 @@ async def create(

return self

def get_derivation_index(self, pubkey: G1Element, max_depth: int = 1000) -> int:
for i in range(0, max_depth):
derived = self.get_public_key(uint32(i))
if derived == pubkey:
return i
derived = self.get_public_key_unhardened(uint32(i))
if derived == pubkey:
return i
return -1

def get_public_key(self, index: uint32) -> G1Element:
return master_sk_to_wallet_sk(self.private_key, index).get_g1()

Expand Down

0 comments on commit e8276f7

Please sign in to comment.