HomePhabricator

Integrate util/system's CInit into RNGState

Authored by Pieter Wuille <pieter.wuille@gmail.com> on Jan 16 2019, 00:03.

Description

Integrate util/system's CInit into RNGState

Summary:
This guarantees that OpenSSL is initialized properly whenever randomness
is used, even when that randomness is invoked from global constructors.

Note that this patch uses Mutex directly, rather than CCriticalSection.
This is because the lock-detection code is not necessarily initialized
during global constructors.

Partial backport of Core PR14955
https://github.com/bitcoin/bitcoin/pull/14955/commits/16e40a8b562ad849a5f5e8b21ceb375e46038243

Depends on D4393

Test Plan:

make check

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D4394

Details

Committed
Nico Guiton <nico@bitframe.org>Fri, Nov 8, 17:52
Pushed
nakihitoFri, Nov 8, 17:52
Reviewer
Restricted Owners Package
Differential Revision
D4394: Integrate util/system's CInit into RNGState
Parents
rABC831f364fd261: Updated manpages for 0.20.6 release
Branches
Unknown
Tags
Unknown

Event Timeline

Nico Guiton <nico@bitframe.org> committed rABC49ceff8b4b78: Integrate util/system's CInit into RNGState (authored by Pieter Wuille <pieter.wuille@gmail.com>).Fri, Nov 8, 17:52