From a0f901cf4f12db82a0c5817758d90de317657792 Mon Sep 17 00:00:00 2001 From: Shuvayan Saha Date: Wed, 25 Aug 2021 02:37:37 +0530 Subject: [PATCH] Update BitcoinKit.Private.swift --- Sources/BitcoinKitPrivate/BitcoinKit.Private.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/BitcoinKitPrivate/BitcoinKit.Private.swift b/Sources/BitcoinKitPrivate/BitcoinKit.Private.swift index 83006ab2..92d63a2f 100644 --- a/Sources/BitcoinKitPrivate/BitcoinKit.Private.swift +++ b/Sources/BitcoinKitPrivate/BitcoinKit.Private.swift @@ -228,9 +228,11 @@ public class _HDKey { //if BN_is_zero(privateKeyNum) { // return nil //} + /* if privateKeyNum.pointee.top == 0 { // BN_is_zero return nil } + */ let numBytes = ((BN_num_bits(privateKeyNum)+7)/8) // BN_num_bytes result = Data(count: Int(numBytes)) result.withUnsafeMutableBytes { (ptr: UnsafeMutableRawBufferPointer) in