Skip to content

Commit

Permalink
Add Checkpoints around forked block
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedbodi committed Oct 2, 2018
1 parent 6b4cd8f commit f38945c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/chainparams.cpp
Expand Up @@ -137,7 +137,17 @@ class CMainParams : public CChainParams {

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
( 0, uint256S("0x21938e71a19f0053f1ea9d2c616feba7c767ade95a20946f26747ae96aaa572b"))
( 0, uint256S("0x21938e71a19f0053f1ea9d2c616feba7c767ade95a20946f26747ae96aaa572b"))
( 950521, uint256S("0x3fd8beaae900cdc6d4fe7252ed0572516f2f8e079cedb0ffe3ef577e656d6ee6"))
( 950526, uint256S("0x5c8b911f8bbbea5972d2aeaf55594b1397652475d55cd09ec3d0dba482f3000b"))
( 950534, uint256S("0xf403303c0ff512ca5693b1f4eee363443bc8ba6be25c0fb54e5a137350ad57a4"))
( 950552, uint256S("0x8986e7893a4a572324bd5f1d836be037bf65ce962570fb9bd0d42f08740ca673"))
( 950712, uint256S("0x7c5d436197fe453989f3d797bc7e247c905e9fa032aee8188daf617774024b0d"))
( 950739, uint256S("0x21f8a430dc8fc537f6a586f669e059ef164cedb46fb06209b26f750bc026d0c8"))
( 950849, uint256S("0xe4eb68d4627bf7cb4f242618133377fdc8f5cef0ce1692c3c0b51f3b0db10ceb"))
( 959135, uint256S("0xf9767b30c72249a20b7abcda654f6d435ca5f94955a240d1e3e566cedeaa39fa"))
( 959136, uint256S("0x207e225d9825e8abd76e3a494c7cfaf532cd2b138ae11a5d32c3c3162a3f8996"))
( 959137, uint256S("0x1bd73d05be14274de41b0e9a690b36394192a2b56a0f6b0a05ba4f99079ea040"))
};

chainTxData = ChainTxData{
Expand Down
2 changes: 1 addition & 1 deletion src/net_processing.cpp
Expand Up @@ -2602,7 +2602,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
// message would be undesirable as we transmit it ourselves.
}

else if (strCommand == NetMsgType::ACP) {
else if (strCommand == NetMsgType::ACP || strCommand == NetMsgType::CHECKPOINT) {
LogPrintf("Received checkpoint, beginning processing.\n");
CSyncCheckpoint checkpoint;
vRecv >> checkpoint;
Expand Down
1 change: 1 addition & 0 deletions src/protocol.cpp
Expand Up @@ -40,6 +40,7 @@ const char *CMPCTBLOCK="cmpctblock";
const char *GETBLOCKTXN="getblocktxn";
const char *BLOCKTXN="blocktxn";
const char *ACP="acp";
const char *CHECKPOINT="checkpoint";
};

/** All known message types. Keep this in the same order as the list of
Expand Down
1 change: 1 addition & 0 deletions src/protocol.h
Expand Up @@ -241,6 +241,7 @@ extern const char *GETBLOCKTXN;
*/
extern const char *BLOCKTXN;
extern const char *ACP;
extern const char *CHECKPOINT;
};

/* Get a vector of all valid message types (see above) */
Expand Down

0 comments on commit f38945c

Please sign in to comment.