network: always use lowercase

This commit is contained in:
Daniel Cousens 2014-06-14 00:30:13 +10:00
commit 553ade1208
8 changed files with 26 additions and 26 deletions

View file

@ -56,10 +56,10 @@ describe('Bitcoin-core', function() {
assert.equal(address.hash.toString('hex'), hex)
if (params.addrType === 'pubkey') {
assert.equal(address.version, network.pubKeyHash)
assert.equal(address.version, network.pubkeyhash)
} else if (params.addrType === 'script') {
assert.equal(address.version, network.scriptHash)
assert.equal(address.version, network.scripthash)
}
})
})
@ -68,10 +68,10 @@ describe('Bitcoin-core', function() {
// base58_keys_invalid
describe('Address', function() {
var allowedNetworks = [
networks.bitcoin.pubKeyHash,
networks.bitcoin.scriptHash,
networks.testnet.pubKeyHash,
networks.testnet.scriptHash
networks.bitcoin.pubkeyhash,
networks.bitcoin.scripthash,
networks.testnet.pubkeyhash,
networks.testnet.scripthash
]
base58_keys_invalid.forEach(function(f) {

View file

@ -72,7 +72,7 @@ describe('ECPubKey', function() {
var pubKey = new ECPubKey(Q)
var address = pubKey.getAddress(networks.testnet)
assert.equal(address.version, networks.testnet.pubKeyHash)
assert.equal(address.version, networks.testnet.pubkeyhash)
assert.equal(address.hash.toString('hex'), fixtures.compressed.hash160)
})
})

View file

@ -204,7 +204,7 @@ describe('HDNode', function() {
var hd = HDNode.fromBase58(f.master.base58)
hd.network = networks.testnet
assert.equal(hd.getAddress().version, networks.testnet.pubKeyHash)
assert.equal(hd.getAddress().version, networks.testnet.pubkeyhash)
})
})

View file

@ -100,7 +100,7 @@ describe('Scripts', function() {
var redeemScript = scripts.multisigOutput(2, pubKeys)
var hash160 = crypto.hash160(new Buffer(redeemScript.buffer))
var multisigAddress = new Address(hash160, networks.bitcoin.scriptHash)
var multisigAddress = new Address(hash160, networks.bitcoin.scripthash)
assert.equal(multisigAddress.toString(), '32vYjxBb7pHJJyXgNk8UoK3BdRDxBzny2v')
})