Skip to content

Commit

Permalink
[Refactor] rename SporkKey to SporkPubKey
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Sep 23, 2019
1 parent 899b4bd commit ab603a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ class CMainParams : public CChainParams

nPoolMaxTransactions = 3;
nBudgetCycleBlocks = 43200; //!< Amount of blocks in a months period of time (using 1 minutes per) = (60*24*30)
strSporkKey = "040F129DE6546FE405995329A887329BED4321325B1A73B0A257423C05C1FCFE9E40EF0678AEF59036A22C42E61DFD29DF7EFB09F56CC73CADF64E05741880E3E7";
strSporkKeyOld = "0499A7AF4806FC6DE640D23BC5936C29B77ADF2174B4F45492727F897AE63CF8D27B2F05040606E0D14B547916379FA10716E344E745F880EDC037307186AA25B7";
strSporkPubKey = "040F129DE6546FE405995329A887329BED4321325B1A73B0A257423C05C1FCFE9E40EF0678AEF59036A22C42E61DFD29DF7EFB09F56CC73CADF64E05741880E3E7";
strSporkPubKeyOld = "0499A7AF4806FC6DE640D23BC5936C29B77ADF2174B4F45492727F897AE63CF8D27B2F05040606E0D14B547916379FA10716E344E745F880EDC037307186AA25B7";
strObfuscationPoolDummyAddress = "D87q2gC9j6nNrnzCsg4aY6bHMLsT9nUhEw";
nStartMasternodePayments = 1403728576; //Wed, 25 Jun 2014 20:36:16 GMT

Expand Down Expand Up @@ -355,8 +355,8 @@ class CTestNetParams : public CMainParams

nPoolMaxTransactions = 2;
nBudgetCycleBlocks = 144; //!< Ten cycles per day on testnet
strSporkKey = "04E88BB455E2A04E65FCC41D88CD367E9CCE1F5A409BE94D8C2B4B35D223DED9C8E2F4E061349BA3A38839282508066B6DC4DB72DD432AC4067991E6BF20176127";
strSporkKeyOld = "04A8B319388C0F8588D238B9941DC26B26D3F9465266B368A051C5C100F79306A557780101FE2192FE170D7E6DEFDCBEE4C8D533396389C0DAFFDBC842B002243C";
strSporkPubKey = "04E88BB455E2A04E65FCC41D88CD367E9CCE1F5A409BE94D8C2B4B35D223DED9C8E2F4E061349BA3A38839282508066B6DC4DB72DD432AC4067991E6BF20176127";
strSporkPubKeyOld = "04A8B319388C0F8588D238B9941DC26B26D3F9465266B368A051C5C100F79306A557780101FE2192FE170D7E6DEFDCBEE4C8D533396389C0DAFFDBC842B002243C";
strObfuscationPoolDummyAddress = "y57cqfGRkekRyDRNeJiLtYVEbvhXrNbmox";
nStartMasternodePayments = 1420837558; //Fri, 09 Jan 2015 21:05:58 GMT
nBudget_Fee_Confirmations = 3; // Number of confirmations for the finalization fee. We have to make this very short
Expand Down Expand Up @@ -437,7 +437,7 @@ class CRegTestParams : public CTestNetParams
private key hex: bd4960dcbd9e7f2223f24e7164ecb6f1fe96fc3a416f5d3a830ba5720c84b8ca
Address: yCvUVd72w7xpimf981m114FSFbmAmne7j9
*/
strSporkKey = "043969b1b0e6f327de37f297a015d37e2235eaaeeb3933deecd8162c075cee0207b13537618bde640879606001a8136091c62ec272dd0133424a178704e6e75bb7";
strSporkPubKey = "043969b1b0e6f327de37f297a015d37e2235eaaeeb3933deecd8162c075cee0207b13537618bde640879606001a8136091c62ec272dd0133424a178704e6e75bb7";
}
const Checkpoints::CCheckpointData& Checkpoints() const
{
Expand Down
8 changes: 4 additions & 4 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class CChainParams
int64_t GetProposalEstablishmentTime() const { return nProposalEstablishmentTime; }

/** Spork key and Masternode Handling **/
std::string SporkKey() const { return strSporkKey; }
std::string SporkKeyOld() const { return strSporkKeyOld; }
std::string SporkPubKey() const { return strSporkPubKey; }
std::string SporkPubKeyOld() const { return strSporkPubKeyOld; }
int64_t NewSporkStart() const { return nEnforceNewSporkKey; }
int64_t RejectOldSporkKey() const { return nRejectOldSporkKey; }
std::string ObfuscationPoolDummyAddress() const { return strObfuscationPoolDummyAddress; }
Expand Down Expand Up @@ -193,8 +193,8 @@ class CChainParams
bool fHeadersFirstSyncingActive;
int nPoolMaxTransactions;
int nBudgetCycleBlocks;
std::string strSporkKey;
std::string strSporkKeyOld;
std::string strSporkPubKey;
std::string strSporkPubKeyOld;
int64_t nEnforceNewSporkKey;
int64_t nRejectOldSporkKey;
std::string strObfuscationPoolDummyAddress;
Expand Down
4 changes: 2 additions & 2 deletions src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ bool CSporkManager::CheckSignature(CSporkMessage& spork, bool fRequireNew)
{
//note: need to investigate why this is failing
std::string strMessage = std::to_string(spork.nSporkID) + std::to_string(spork.nValue) + std::to_string(spork.nTimeSigned);
CPubKey pubkeynew(ParseHex(Params().SporkKey()));
CPubKey pubkeynew(ParseHex(Params().SporkPubKey()));
std::string errorMessage = "";

bool fValidWithNewKey = obfuScationSigner.VerifyMessage(pubkeynew, spork.vchSig,strMessage, errorMessage);
Expand All @@ -187,7 +187,7 @@ bool CSporkManager::CheckSignature(CSporkMessage& spork, bool fRequireNew)

// See if window is open that allows for old spork key to sign messages
if (!fValidWithNewKey && GetAdjustedTime() < Params().RejectOldSporkKey()) {
CPubKey pubkeyold(ParseHex(Params().SporkKeyOld()));
CPubKey pubkeyold(ParseHex(Params().SporkPubKeyOld()));
return obfuScationSigner.VerifyMessage(pubkeyold, spork.vchSig, strMessage, errorMessage);
}

Expand Down

0 comments on commit ab603a1

Please sign in to comment.