Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
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
15template <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
20static_assert(
22 "p2sh is not minimum value for BuriedDeployment");
static constexpr bool is_minimum()
ValidDeployment only checks upper bounds for ensuring validity.
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