Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
deploymentstatus.cpp
Go to the documentation of this file.
1
// Copyright (c) 2020 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 <
consensus/params.h
>
6
7
#include <type_traits>
8
15
template
<
typename
T, T x>
static
constexpr
bool
is_minimum
() {
16
using
U
=
typename
std::underlying_type<T>::type;
17
return
x == std::numeric_limits<U>::min();
18
}
19
20
static_assert
(
21
is_minimum<Consensus::BuriedDeployment, Consensus::DEPLOYMENT_P2SH>
(),
22
"p2sh is not minimum value for BuriedDeployment"
);
is_minimum
static constexpr bool is_minimum()
ValidDeployment only checks upper bounds for ensuring validity.
Definition
deploymentstatus.cpp:15
params.h
GetRand
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition
random.h:85
Generated on Fri Nov 22 2024 02:38:21 for Bitcoin ABC by
1.9.8