Page MenuHomePhabricator

Specific GetOSRandom for Linux/FreeBSD/OpenBSD
ClosedPublic

Authored by deadalnix on Aug 26 2017, 18:15.

Details

Summary

This is backport from PR9821 from core.

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good, except for the attribution issue

src/test/random_tests.cpp
1 ↗(On Diff #1216)

Not preserving the original copyright notice in accordance with MIT license [1].

Original file (otherwise unmodified as far as I can see):
https://github.com/bitcoin/bitcoin/pull/9821/files#diff-12449efc442018e41245aed7f87e9b07

[1] https://opensource.org/licenses/MIT:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

This revision now requires changes to proceed.Aug 26 2017, 19:04

I like this diff. A lot.

I'll wait for others to comment but if noone approves it in a day or so I'll approve it.

src/random.cpp
276 ↗(On Diff #1216)

Heh, cute.

For any random set of 32 bytes, there is a 1 in 16 chance 1 of them will be 0.

However, for 1024 tries, there is a 1/(16^1024) chance all will be 0.

So yeah, this test is fine.

deadalnix edited edge metadata.

Change copyright line from the Bitcoin developpers to the bitcoin core devellopers

This revision is now accepted and ready to land.Aug 27 2017, 11:58
This revision was automatically updated to reflect the committed changes.