experimental-genesis 1
experimental-genesis 2
experimental-genesis 3
experimental-genesis 4
experimental-genesis 5
experimental-genesis 6
experimental-genesis 7
experimental-genesis 8
experimental-genesis 9
experimental-genesis 10
experimental-genesis 11
experimental-genesis 12
experimental-genesis 13
experimental-genesis 14
experimental-genesis 15
experimental-genesis 16
experimental-genesis 17
experimental-genesis 18
experimental-genesis 19
experimental-genesis 20
experimental-genesis 21
experimental-genesis 22
experimental-genesis 23
experimental-genesis 24
experimental-genesis 25
experimental-genesis 26
experimental-genesis 27
experimental-genesis 28
experimental-genesis 29
experimental-genesis 30
experimental-genesis 31
experimental-genesis 32
experimental-genesis 33
experimental-genesis 34
experimental-genesis 35
experimental-genesis 36 #include <boost/assign/list_of.hpp> // for 'map_list_of()'
experimental-genesis 37 #include <boost/foreach.hpp>
experimental-genesis 38
experimental-genesis 39 #include "headers.h"
experimental-genesis 40 #include "checkpoints.h"
experimental-genesis 41
experimental-genesis 42 namespace Checkpoints
experimental-genesis 43 {
experimental-genesis 44 typedef std::map<int, uint256> MapCheckpoints;
experimental-genesis 45
experimental-genesis 46
experimental-genesis 47
experimental-genesis 48
experimental-genesis 49
experimental-genesis 50
experimental-genesis 51
experimental-genesis 52
experimental-genesis 53 static MapCheckpoints mapCheckpoints =
experimental-genesis 54 boost::assign::map_list_of
experimental-genesis 55 ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
experimental-genesis 56 ( 33333, uint256("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"))
experimental-genesis 57 ( 68555, uint256("0x00000000001e1b4903550a0b96e9a9405c8a95f387162e4944e8d9fbe501cd6a"))
experimental-genesis 58 ( 70567, uint256("0x00000000006a49b14bcf27462068f1264c961f11fa2e0eddd2be0791e1d4124a"))
experimental-genesis 59 ( 74000, uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))
experimental-genesis 60 (105000, uint256("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"))
experimental-genesis 61 (118000, uint256("0x000000000000774a7f8a7a12dc906ddb9e17e75d684f15e00f8767f9e8f36553"))
experimental-genesis 62 (134444, uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"))
experimental-genesis 63 (140700, uint256("0x000000000000033b512028abb90e1626d8b346fd0ed598ac0a3c371138dce2bd"))
experimental-genesis 64 (168000, uint256("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"))
experimental-genesis 65 ;
experimental-genesis 66
experimental-genesis 67 bool CheckBlock(int nHeight, const uint256& hash)
experimental-genesis 68 {
experimental-genesis 69 if (fTestNet) return true;
experimental-genesis 70
experimental-genesis 71 MapCheckpoints::const_iterator i = mapCheckpoints.find(nHeight);
experimental-genesis 72 if (i == mapCheckpoints.end()) return true;
experimental-genesis 73 return hash == i->second;
experimental-genesis 74 }
experimental-genesis 75
experimental-genesis 76 int GetTotalBlocksEstimate()
experimental-genesis 77 {
experimental-genesis 78 if (fTestNet) return 0;
experimental-genesis 79
experimental-genesis 80 return mapCheckpoints.rbegin()->first;
experimental-genesis 81 }
experimental-genesis 82
experimental-genesis 83 CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
experimental-genesis 84 {
experimental-genesis 85 if (fTestNet) return NULL;
experimental-genesis 86
experimental-genesis 87 BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints)
experimental-genesis 88 {
experimental-genesis 89 const uint256& hash = i.second;
experimental-genesis 90 std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
experimental-genesis 91 if (t != mapBlockIndex.end())
experimental-genesis 92 return t->second;
experimental-genesis 93 }
experimental-genesis 94 return NULL;
experimental-genesis 95 }
experimental-genesis 96 }