MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / hashBalanceID

Function hashBalanceID

queue.go:261–265  ·  view source on GitHub ↗

hashBalanceID returns a consistent hash value for a string balance ID. Parameters: - balanceID string: The balance ID to hash. Returns: - int: The hash value of the balance ID.

(balanceID string)

Source from the content-addressed store, hash-verified

259// Returns:
260// - int: The hash value of the balance ID.
261func hashBalanceID(balanceID string) int {
262 hasher := fnv.New32a()
263 _, _ = hasher.Write([]byte(balanceID))
264 return int(hasher.Sum32())
265}
266
267// GetTransactionFromQueue retrieves a transaction from the queue by its ID.
268//

Callers 3

transactionQueueNameMethod · 0.85
BenchmarkHashBalanceIDFunction · 0.85

Calls

no outgoing calls

Tested by 2

BenchmarkHashBalanceIDFunction · 0.68