Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615358
checkpoints.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
834 B
Subscribers
None
checkpoints.cpp
View Options
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include
"checkpoints.h"
#include
"chain.h"
#include
"chainparams.h"
#include
"uint256.h"
#include
"validation.h"
#include
<cstdint>
#include
<boost/range/adaptor/reversed.hpp>
namespace
Checkpoints
{
CBlockIndex
*
GetLastCheckpoint
(
const
CCheckpointData
&
data
)
{
const
MapCheckpoints
&
checkpoints
=
data
.
mapCheckpoints
;
for
(
const
MapCheckpoints
::
value_type
&
i
:
boost
::
adaptors
::
reverse
(
checkpoints
))
{
const
uint256
&
hash
=
i
.
second
;
BlockMap
::
const_iterator
t
=
mapBlockIndex
.
find
(
hash
);
if
(
t
!=
mapBlockIndex
.
end
())
return
t
->
second
;
}
return
NULL
;
}
}
// namespace Checkpoints
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 23, 10:05 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4520697
Default Alt Text
checkpoints.cpp (834 B)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment