Bitcoin ABC
0.28.12
P2P Digital Currency
src
avalanche
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
10
namespace
avalanche
{
11
12
ProofId
LimitedProofId::computeProofId
(
const
CPubKey
&proofMaster)
const
{
13
CHashWriter
ss(
SER_GETHASH
, 0);
14
ss << *
this
;
15
ss << proofMaster;
16
return
ProofId
(ss.
GetHash
());
17
}
18
19
}
// namespace avalanche
CHashWriter
A writer stream (for serialization) that computes a 256-bit hash.
Definition:
hash.h:99
CHashWriter::GetHash
uint256 GetHash()
Compute the double-SHA256 hash of all data written to this object.
Definition:
hash.h:122
CPubKey
An encapsulated public key.
Definition:
pubkey.h:31
avalanche
Definition:
avalanche.h:13
proofid.h
pubkey.h
SER_GETHASH
@ SER_GETHASH
Definition:
serialize.h:168
avalanche::LimitedProofId::computeProofId
ProofId computeProofId(const CPubKey &proofMaster) const
Definition:
proofid.cpp:12
avalanche::ProofId
Definition:
proofid.h:17
Generated on Thu Mar 28 2024 20:53:35 for Bitcoin ABC by
1.9.1