Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615088
proofid.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
proofid.h
View Options
// Copyright (c) 2020 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_AVALANCHE_PROOFID_H
#define BITCOIN_AVALANCHE_PROOFID_H
#include
<salteduint256hasher.h>
#include
<uint256.h>
#include
<string>
class
CPubKey
;
namespace
avalanche
{
struct
ProofId
:
public
uint256
{
explicit
ProofId
()
:
uint256
()
{}
explicit
ProofId
(
const
uint256
&
b
)
:
uint256
(
b
)
{}
static
ProofId
fromHex
(
const
std
::
string
&
str
)
{
ProofId
r
;
r
.
SetHex
(
str
);
return
r
;
}
};
struct
LimitedProofId
:
public
uint256
{
explicit
LimitedProofId
()
:
uint256
()
{}
explicit
LimitedProofId
(
const
uint256
&
b
)
:
uint256
(
b
)
{}
static
LimitedProofId
fromHex
(
const
std
::
string
&
str
)
{
LimitedProofId
r
;
r
.
SetHex
(
str
);
return
r
;
}
ProofId
computeProofId
(
const
CPubKey
&
proofMaster
)
const
;
};
class
SaltedProofIdHasher
:
private
SaltedUint256Hasher
{
public
:
SaltedProofIdHasher
()
:
SaltedUint256Hasher
()
{}
size_t
operator
()(
const
ProofId
&
proofid
)
const
{
return
hash
(
proofid
);
}
};
}
// namespace avalanche
#endif
// BITCOIN_AVALANCHE_PROOFID_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 23, 09:56 (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4520307
Default Alt Text
proofid.h (1 KB)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment