class CSyncCheckpoint : public CUnsignedSyncCheckpoint
{
public:
+ static const std::string strMasterPubKey;
+
std::vector<unsigned char> vchMsg;
std::vector<unsigned char> vchSig;
return false;
}
- bool CheckSignature()
- {
- CKey key;
- if (!key.SetPubKey(ParseHex("0487ca85b6ae9d311f996c7616d20d0c88a5b4f07d25e78f419019f35cce6522acf978b2d99f0e7a58db1f120439e5c1889266927854aa57c93956c2569188a539")))
- return error("CSyncCheckpoint::CheckSignature() : SetPubKey failed");
- if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
- return error("CSyncCheckpoint::CheckSignature() : verify signature failed");
-
- // Now unserialize the data
- CDataStream sMsg(vchMsg);
- sMsg >> *(CUnsignedSyncCheckpoint*)this;
- return true;
- }
-
+ bool CheckSignature();
bool ProcessSyncCheckpoint(CNode* pfrom);
};
extern uint256 hashSyncCheckpoint;
extern CSyncCheckpoint checkpointMessage;
+ extern uint256 hashInvalidCheckpoint;
extern CCriticalSection cs_hashSyncCheckpoint;
- bool AcceptPendingSyncCheckpoint(uint256 hashAcceptedBlock);
+ bool AcceptPendingSyncCheckpoint();
+ uint256 AutoSelectSyncCheckpoint();
+ bool CheckSync(const uint256& hashBlock, const CBlockIndex* pindexPrev);
+ bool IsPendingSyncCheckpoint(uint256 hashBlock);
// ppcoin: automatic checkpoint
extern int nAutoCheckpoint;