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

Commit

Permalink
fix(src/networks.js): litecoinTest WIF prefix
Browse files Browse the repository at this point in the history
Reference:
https://github.com/litecoin-project/litecoin/blob/1b6c4807/src/chainparams.cpp#L248

(`0xef === 239`)

In fact all testnets have the same WIF prefix.

Issue: BG-16466
  • Loading branch information
OttoAllmendinger committed Jan 9, 2020
1 parent bc71062 commit b08089a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
3 changes: 1 addition & 2 deletions src/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ module.exports = {
},
pubKeyHash: 0x6f,
scriptHash: 0x3a,
// FIXME(BG-16466): should be 0xef instead
wif: 0xb0,
wif: 0xef,
coin: coins.LTC
},

Expand Down
18 changes: 1 addition & 17 deletions test/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ describe('networks', function () {
'zcash'
]

const bitcoinTestnetSharedWIFPrefix = [
'testnet',
'bitcoincashTestnet',
'bitcoinsvTestnet',
'dashTest',
'zcashTest'
]

// FIXME(BG-16466): this is a bug, they should be distinct
const litecoinSharedWIFPrefix = [
'litecoin',
'litecoinTest'
]

const bech32Coins = [
'bitcoin', 'testnet',
'bitcoingold',
Expand Down Expand Up @@ -150,9 +136,7 @@ describe('networks', function () {
assert.strictEqual(
(network.wif === otherNetwork.wif),
sameGroup(bitcoinMainnetSharedWIFPrefix, name, otherName) ||
sameGroup(bitcoinTestnetSharedWIFPrefix, name, otherName) ||
// FIXME(BG-16466): this group should not exist
sameGroup(litecoinSharedWIFPrefix, name, otherName)
(coins.isTestnet(network) && coins.isTestnet(otherNetwork))
)
})
}
Expand Down

0 comments on commit b08089a

Please sign in to comment.