Litecoin-cli validates segwit bitcoin address as valid litecoin address I was messing around with litecoin-cli and found some strange behaviour. If I try to validate a segwit bitcoin address, with the litecoin-cli it returns as a valid litecoin address.

Is this the intended behaviour, or is this a bug?

[user@server ~]# bitcoin-cli getnewaddress
13nKR2gooAr6MEZev2NsQ5RjQPHBs4vY8g
[user@server ~]# litecoin-cli validateaddress 13nKR2gooAr6MEZev2NsQ5RjQPHBs4vY8g
{
  "isvalid": false
}
[user@server ~]# bitcoin-cli addwitnessaddress 13nKR2gooAr6MEZev2NsQ5RjQPHBs4vY8g
39kzm57uJi8iZ9qJWGivVjf44XYJFLur9M
[user@server ~]# litecoin-cli validateaddress 39kzm57uJi8iZ9qJWGivVjf44XYJFLur9M
{
  "isvalid": true,
  "address": "39kzm57uJi8iZ9qJWGivVjf44XYJFLur9M",
  "scriptPubKey": "xxxxxxxxxxxxxxx",
  "ismine": false,
  "iswatchonly": false,
  "isscript": true
}


`
No, this is working as intended. When litecoin first introduced segwit, they also used 3.... adresses. They were (are) generated the same way ( Using the same P2SH as bitcoin.).

These now start with an M.., but because of backwards compatibility these 3... adresses are still valid. (but no longer used.)

I guess this issue covers what you are facing pretty well - https://github.com/litecoin-project/litecoin/issues/433