Raven Core
3.0.0
P2P Digital Currency
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
z
+
Functions
b
c
d
f
g
h
i
m
o
p
q
s
v
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
f
i
k
l
m
o
p
r
s
t
v
+
Enumerations
b
c
d
e
f
m
n
o
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Properties
+
Related Functions
a
c
d
f
o
p
t
u
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
z
+
Typedefs
b
c
h
i
k
m
n
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
m
n
o
q
r
s
t
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
r
s
t
u
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
primitives
block.cpp
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2016 The Bitcoin Core developers
3
// Copyright (c) 2017-2019 The Raven Core developers
4
// Distributed under the MIT software license, see the accompanying
5
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
6
7
#include "
primitives/block.h
"
8
9
#include "hash.h"
10
#include "
tinyformat.h
"
11
#include "
utilstrencodings.h
"
12
#include "
crypto/common.h
"
13
14
uint256
CBlockHeader::GetHash
()
const
15
{
16
return
HashX16R
(
BEGIN
(
nVersion
),
END
(
nNonce
),
hashPrevBlock
);
17
}
18
19
std::string
CBlock::ToString
()
const
20
{
21
std::stringstream s;
22
s <<
strprintf
(
"CBlock(hash=%s, ver=0x%08x, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n"
,
23
GetHash
().ToString(),
24
nVersion
,
25
hashPrevBlock
.
ToString
(),
26
hashMerkleRoot
.
ToString
(),
27
nTime
,
nBits
,
nNonce
,
28
vtx.size());
29
for
(
const
auto
& tx : vtx) {
30
s <<
" "
<< tx->ToString() <<
"\n"
;
31
}
32
return
s.str();
33
}
CBlockHeader::nNonce
uint32_t nNonce
Definition:
block.h:30
strprintf
#define strprintf
Definition:
tinyformat.h:1054
CBlock::ToString
std::string ToString() const
Definition:
block.cpp:19
CBlockHeader::nTime
uint32_t nTime
Definition:
block.h:28
HashX16R
uint256 HashX16R(const T1 pbegin, const T1 pend, const uint256 PrevBlockHash)
Definition:
hash.h:361
BEGIN
#define BEGIN(a)
Utilities for converting data from/to strings.
Definition:
utilstrencodings.h:17
utilstrencodings.h
CBlockHeader::hashMerkleRoot
uint256 hashMerkleRoot
Definition:
block.h:27
CBlockHeader::hashPrevBlock
uint256 hashPrevBlock
Definition:
block.h:26
END
#define END(a)
Definition:
utilstrencodings.h:18
tinyformat.h
base_blob::ToString
std::string ToString() const
Definition:
uint256.cpp:63
CBlockHeader::GetHash
uint256 GetHash() const
Definition:
block.cpp:14
uint256
256-bit opaque blob.
Definition:
uint256.h:123
common.h
CBlockHeader::nVersion
int32_t nVersion
Definition:
block.h:25
block.h
CBlockHeader::nBits
uint32_t nBits
Definition:
block.h:29
Generated on Mon Jul 29 2019 02:32:19 for Raven Core by
1.8.13