From cc0e4e518b35cba839b3ff7ab9771ce77cdf6a22 Mon Sep 17 00:00:00 2001 From: Jesus Christ <120573631+Gudnessuche@users.noreply.github.com> Date: Thu, 28 Nov 2024 07:43:28 +0000 Subject: [PATCH] Appropriate comment to explain timestampSeconds and timestampNanos variables The above comment explains that the timestampSeconds and timestampNanos variables are used to capture the current system time, which is then utilized to ensure uniqueness across multiple instances or restarts of the application. --- docs/key_management.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/key_management.md b/docs/key_management.md index 8d7ac6014..8f012932b 100644 --- a/docs/key_management.md +++ b/docs/key_management.md @@ -116,6 +116,7 @@ let ldkDerivationPath = try DerivationPath(path: "m/535h") let ldkChild = try bip32RootKey.derive(path: ldkDerivationPath) let ldkSeed = ldkChild.secretBytes() +// Retrieve the current system time for uniqueness across restarts. let timestampSeconds = UInt64(NSDate().timeIntervalSince1970) let timestampNanos = UInt32(truncating: NSNumber(value: timestampSeconds * 1000 * 1000))