Bitcoin ABC
0.32.11
P2P Digital Currency
src
kernel
checks.cpp
Go to the documentation of this file.
1
// Copyright (c) 2022 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <
kernel/checks.h
>
6
7
#include <
key.h
>
8
#include <random.h>
9
#include <
util/translation.h
>
10
11
namespace
kernel
{
12
13
util::Result<void>
SanityChecks
(
const
Context
&) {
14
if
(!
ECC_InitSanityCheck
()) {
15
return
util::Error
{
Untranslated
(
16
"Elliptic curve cryptography sanity check failure. Aborting."
)};
17
}
18
19
if
(!
Random_SanityCheck
()) {
20
return
util::Error
{
Untranslated
(
21
"OS cryptographic RNG sanity check failure. Aborting."
)};
22
}
23
24
return
{};
25
}
26
27
}
// namespace kernel
checks.h
util::Result< void >
ECC_InitSanityCheck
bool ECC_InitSanityCheck()
Check that required EC support is available at runtime.
Definition:
key.cpp:426
key.h
kernel
Definition:
init.h:28
kernel::SanityChecks
util::Result< void > SanityChecks(const Context &)
Ensure a usable environment with all necessary library support.
Definition:
checks.cpp:13
Random_SanityCheck
bool Random_SanityCheck()
=============== MISCELLANEOUS TEST-ONLY FUNCTIONS ======================
Definition:
random.cpp:730
kernel::Context
Context struct holding the kernel library's logically global state, and passed to external libbitcoin...
Definition:
context.h:20
util::Error
Definition:
result.h:15
translation.h
Untranslated
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
Definition:
translation.h:36
Generated on Thu Mar 19 2026 20:37:12 for Bitcoin ABC by
1.9.4