PIVX Core
5.6.99
P2P Digital Currency
src
wallet
hdchain.cpp
Go to the documentation of this file.
1
// Copyright (c) 2020-2021 The PIVX 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 "
wallet/hdchain.h
"
6
7
#include "
chainparams.h
"
8
#include "key_io.h"
9
#include "
tinyformat.h
"
10
#include "
util/system.h
"
11
#include "
utilstrencodings.h
"
12
13
bool
CHDChain::SetNull
()
14
{
15
nVersion
=
CURRENT_VERSION
;
16
seed_id
=
CKeyID
();
17
nExternalChainCounter
= 0;
18
nInternalChainCounter
= 0;
19
nStakingChainCounter
= 0;
20
return
IsNull
();
21
}
22
23
bool
CHDChain::IsNull
()
const
24
{
25
return
seed_id
.
IsNull
();
26
}
27
28
bool
CHDChain::SetSeed
(
const
CKeyID
& seedId)
29
{
30
// Cannot be initialized twice
31
if
(!
IsNull
())
32
return
false
;
33
34
seed_id
= seedId;
35
return
true
;
36
}
chainparams.h
CHDChain::SetSeed
bool SetSeed(const CKeyID &seedId)
Definition:
hdchain.cpp:28
CHDChain::nInternalChainCounter
uint32_t nInternalChainCounter
Definition:
hdchain.h:35
CHDChain::IsNull
bool IsNull() const
Definition:
hdchain.cpp:23
CHDChain::seed_id
CKeyID seed_id
Definition:
hdchain.h:28
CHDChain::nStakingChainCounter
uint32_t nStakingChainCounter
Definition:
hdchain.h:36
CHDChain::nVersion
int nVersion
Definition:
hdchain.h:27
CHDChain::CURRENT_VERSION
static const int CURRENT_VERSION
Definition:
hdchain.h:32
CHDChain::SetNull
bool SetNull()
Definition:
hdchain.cpp:13
CHDChain::nExternalChainCounter
uint32_t nExternalChainCounter
Definition:
hdchain.h:34
CKeyID
A reference to a CKey: the Hash160 of its serialized public key.
Definition:
pubkey.h:21
base_blob::IsNull
bool IsNull() const
Definition:
uint256.h:36
hdchain.h
system.h
tinyformat.h
utilstrencodings.h
Generated on Wed Apr 2 2025 00:40:39 for PIVX Core by
1.9.1