Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
proofid.cpp
Go to the documentation of this file.
1// Copyright (c) 2021 The Bitcoin 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 <avalanche/proofid.h>
6
7#include <hash.h>
8#include <pubkey.h>
9
10namespace avalanche {
11
13 HashWriter ss{};
14 ss << *this;
15 ss << proofMaster;
16 return ProofId(ss.GetHash());
17}
18
19} // namespace avalanche
An encapsulated public key.
Definition pubkey.h:31
A writer stream (for serialization) that computes a 256-bit hash.
Definition hash.h:100
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
ProofId computeProofId(const CPubKey &proofMaster) const
Definition proofid.cpp:12