mycelium-com / wallet-ios

94 stars 41 forks source link

This comment lies. Only 2 external addresses are scanned. #28

Open jroelofs opened 6 years ago

jroelofs commented 6 years ago

https://github.com/mycelium-com/wallet-ios/blob/2b7842f11e62eef03b46a444ba2db67474c68509/Mycelium%20Wallet/Models/MYCWallet.m#L1389

Giszmo commented 6 years ago

Good find. But how is it possible this went unnoticed for 3 years???!?!

jroelofs commented 6 years ago

Unless someone imported a recovery seed from another wallet where the first >2 external addresses of an account in it were generated but not used for transactions & followed by one that was, then I don't see how it would be noticed. AFAICT, you can't trip over this purely using Mycelium, since the UI doesn't let you ask for more public keys beyond the first one.

Giszmo commented 6 years ago

You are right, it is not the general look-ahead but only for account discovery. Still needs fixing.

jroelofs commented 6 years ago

What's the preferred style for putting a name on them, static const int ExternalAddrScanCount = 20; cf. @property int externalAddrScanCount;?