HDWallet: more explicit branch for parentFingerprint
This commit is contained in:
parent
e8e862f632
commit
3f24e87c54
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ HDWallet.prototype.toBuffer = function(priv) {
|
||||||
buffer.writeUInt8(this.depth, 4)
|
buffer.writeUInt8(this.depth, 4)
|
||||||
|
|
||||||
// 4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
|
// 4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
|
||||||
var fingerprint = this.depth ? this.parentFingerprint : 0x00000000
|
var fingerprint = (this.depth === 0) ? 0x00000000 : this.parentFingerprint
|
||||||
buffer.writeUInt32BE(fingerprint, 5)
|
buffer.writeUInt32BE(fingerprint, 5)
|
||||||
|
|
||||||
// 4 bytes: child number. This is the number i in xi = xpar/i, with xi the key being serialized.
|
// 4 bytes: child number. This is the number i in xi = xpar/i, with xi the key being serialized.
|
||||||
|
|
Loading…
Reference in a new issue