Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
script
keyorigin.h
Go to the documentation of this file.
1
// Copyright (c) 2019 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
#ifndef BITCOIN_SCRIPT_KEYORIGIN_H
6
#define BITCOIN_SCRIPT_KEYORIGIN_H
7
8
#include <
serialize.h
>
9
#include <vector>
10
11
struct
KeyOriginInfo
{
13
uint8_t
fingerprint
[4];
14
std::vector<uint32_t>
path
;
15
16
friend
bool
operator==
(
const
KeyOriginInfo
&
a
,
const
KeyOriginInfo
&
b
) {
17
return
std::equal(std::begin(
a
.fingerprint), std::end(
a
.fingerprint),
18
std::begin(
b
.fingerprint)) &&
19
a
.path ==
b
.path;
20
}
21
22
SERIALIZE_METHODS
(
KeyOriginInfo
,
obj
) {
23
READWRITE
(
obj
.fingerprint,
obj
.path);
24
}
25
26
void
clear
() {
27
memset
(
fingerprint
, 0, 4);
28
path
.clear();
29
}
30
};
31
32
#endif
// BITCOIN_SCRIPT_KEYORIGIN_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
serialize.h
READWRITE
#define READWRITE(...)
Definition
serialize.h:166
KeyOriginInfo
Definition
keyorigin.h:11
KeyOriginInfo::operator==
friend bool operator==(const KeyOriginInfo &a, const KeyOriginInfo &b)
Definition
keyorigin.h:16
KeyOriginInfo::SERIALIZE_METHODS
SERIALIZE_METHODS(KeyOriginInfo, obj)
Definition
keyorigin.h:22
KeyOriginInfo::path
std::vector< uint32_t > path
Definition
keyorigin.h:14
KeyOriginInfo::fingerprint
uint8_t fingerprint[4]
First 32 bits of the Hash160 of the public key at the root of the path.
Definition
keyorigin.h:13
KeyOriginInfo::clear
void clear()
Definition
keyorigin.h:26
Generated on Sat Nov 23 2024 02:38:00 for Bitcoin ABC by
1.9.8