[prev in list] [next in list] [prev in thread] [next in thread] 

List:       btcd-commits
Subject:    [conformal/btcwire] 4b6cd1: Make RandomUint64 block until entropy is available...
From:       Dave Collins <davec () conformal ! com>
Date:       2014-11-14 22:32:17
Message-ID: 546682f114e39_71cc3fabfe3052c098159 () hookshot-fe3-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]


  Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwire
  Commit: 4b6cd175615634bbb36c01dcd8f4bafdbb2a05e9
      https://github.com/conformal/btcwire/commit/4b6cd175615634bbb36c01dcd8f4bafdbb2a05e9
  Author: Dave Collins <davec@conformal.com>
  Date:   2014-11-14 (Fri, 14 Nov 2014)

  Changed paths:
    M common.go
    M common_test.go

  Log Message:
  -----------
  Make RandomUint64 block until entropy is available.

This commit modifies the RandomUint64 function so that rather than
returning an io.ErrShortBuffer when the system does not have enough
entropy available, it now blocks until it does have enough.  This means
that RandomUint64 will now always eventually succeed unless the entropy
source is closed (which only really ever happens when the operating system
is shutting down).

The tests have also been updated for the change in semantics to maintain
100% coverage.

Closes #23.




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic