Skip to content

Commit

Permalink
Appropriate comment to explain timestampSeconds and timestampNanos va…
Browse files Browse the repository at this point in the history
…riables

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.
  • Loading branch information
Gudnessuche authored Nov 28, 2024
1 parent 44307df commit cc0e4e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/key_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit cc0e4e5

Please sign in to comment.