HDNode: assert chain code length

This commit is contained in:
Daniel Cousens 2014-07-29 01:30:51 +10:00
parent 5888ca5730
commit e69ba7ce76
2 changed files with 8 additions and 1 deletions

View file

@ -31,6 +31,7 @@ function HDNode(K, chainCode, network) {
network = network || networks.bitcoin
assert(Buffer.isBuffer(chainCode), 'Expected Buffer, got ' + chainCode)
assert.equal(chainCode.length, 32, 'Expected chainCode length of 32, got ' + chainCode.length)
assert(network.bip32, 'Unknown BIP32 constants for network')
this.chainCode = chainCode