Update 1.5.x hdnode.js

Informed the pubkey when building an HDNode from an ECKey (otherwise, derivation would fail on "this.pubKey.toBuffer()")
This commit is contained in:
Joel Santirso 2015-05-06 17:41:32 +02:00
parent 7f2f81233a
commit fc9d2ff2f2

View File

@ -44,6 +44,7 @@ function HDNode (K, chainCode, network) {
} else if (K instanceof ECKey) {
assert(K.pub.compressed, 'ECKey must be compressed')
this.privKey = K
this.pubKey = K.pub
} else if (K instanceof ECPubKey) {
assert(K.compressed, 'ECPubKey must be compressed')
this.pubKey = K