Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Legacy Litecoin address can have same prefix as Bech32 #5

Open
4 tasks
onyb opened this issue Jul 23, 2020 · 0 comments
Open
4 tasks

Legacy Litecoin address can have same prefix as Bech32 #5

onyb opened this issue Jul 23, 2020 · 0 comments

Comments

@onyb
Copy link
Contributor

onyb commented Jul 23, 2020

Opening this issue for someone working on Litecoin integration in future.

There is a 1 in 40000 chance that a legacy P2PKH Litecoin address starts with ltc1, which is normally reserved for native segwit (bech32) addresses.

Checklist:

  • Figure out why this happens only with Litecoin.
    • Can this happen with other coins? What are the odds?
  • Find out if btcutil might generate such an address.
  • Find out if this issue has been auto-resolved in newer versions of btcutil.
    • Unlikely if this is a rare edge cas found only in Litecoin.
  • Add a generic test case here, or in btcutil, to ensure it is handled properly by us.

A quick fix in one of btcutil's fork is available here: jakm/btcutil@fbb6f71.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant