Skip to content

Commit

Permalink
build 13.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
licobc committed Jun 12, 2019
1 parent 8d1e495 commit 046ee69
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 22 deletions.
13 changes: 9 additions & 4 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ class CMainParams : public CChainParams
// + Is surrounded by blocks with reasonable timestamps
// (no blocks before with a timestamp after, none after with timestamp before)
// + Contains no strange transactions
// Getting a checkpoint
// first: get the blockhash, getblockhash 5000, for example
// second: get stats from the windows: getchaintxstats 4999 hash

checkpointData = {
{
{ 0, nHashGenesisBlock},
Expand Down Expand Up @@ -236,15 +240,16 @@ class CTestNetParams : public CMainParams

checkpointData = {
{
{ 0, nHashGenesisBlock}
{ 0, nHashGenesisBlock},
{5000, uint256S("0x5871e36a46456ac2cd9d4985dc7671d2a97fb0df4ff1e5282b4ebfa9276d5c48")}
}
};

chainTxData = ChainTxData{
// Data from rpc: getchaintxstats
/* nTime */ genesis.GetBlockTime(),
/* nTxCount */ 0,
/* dTxRate */ 0
/* nTime */ 1560331326,
/* nTxCount */ 10000,
/* dTxRate */ 0.02409597902266439
};
}
};
Expand Down
32 changes: 16 additions & 16 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,25 +1198,25 @@ void updateStaking2KoreConf( bool staking )

std::ostringstream strTemp;

bool isConfExist = false;
bool isStakingAlreadyinKoreConf = false;

if (streamConfig.peek() == std::ifstream::traits_type::eof())
strTemp << strNew << std::endl;
else {
for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) {
std::string strKey = it->string_key;
std::string strValue = it->value[0];
if((strKey + "=" + strValue) == strReplace){
strTemp << strNew << std::endl;
isConfExist = true;
continue;
}
strTemp << strKey << "=" << strValue << std::endl;
}
if(!isConfExist)
for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) {
std::string strKey = it->string_key;
std::string strValue = it->value[0];
if (strKey == "staking") {
// Let's put the new value
strTemp << strNew << std::endl;
isStakingAlreadyinKoreConf = true;
continue;
}
// the key is different, se lets keep its value
strTemp << strKey << "=" << strValue << std::endl;
}
if (!isStakingAlreadyinKoreConf) {
// our key is not in the file yet, so lets add it
strTemp << strNew << std::endl;
}

std::ofstream newKoreConfig;
newKoreConfig.open(pathConfig.string().c_str(),fstream::out);

Expand Down
7 changes: 5 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
// Let's show how this affets staking
labelStakingIcon->setEnabled(true);
labelStakingIcon->checkStakingTimer();

break;
case WalletModel::UnlockedForAnonymizationOnly:
Expand All @@ -1139,6 +1140,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
// Let's show how this affets staking
labelStakingIcon->setEnabled(true);
labelStakingIcon->checkStakingTimer();

break;
case WalletModel::Locked:
Expand All @@ -1152,6 +1154,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
// Let's show how this affets staking
labelStakingIcon->setEnabled(false);
labelStakingIcon->checkStakingTimer();

break;
}
Expand Down Expand Up @@ -1375,7 +1378,7 @@ void StakingStatusBarControl::setOptionsModel(OptionsModel* optionsModel)
enableStaking->setEnabled(staking);
disableStaking->setEnabled(!staking);
//StakingCoins(staking);
updateStakingIcon(staking);
updateStakingIcon(staking, false);
}
}

Expand All @@ -1398,7 +1401,7 @@ void StakingStatusBarControl::updateStakingIcon(bool staking, bool action)

if (staking) {
setPixmap(QIcon(":/icons/staking_active").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
setToolTip(tr("Staking is active\n MultiSend: %1").arg(fMultiSend ? tr("Active") : tr("Not Active")));
setToolTip(tr("Staking is active%1\n MultiSend: %2").arg( pwalletMain->IsLocked() ? tr(", when unlocked") : tr(" ")).arg(fMultiSend ? tr("Active") : tr("Not Active")));
if (action && enableStaking->isEnabled() == true) {
updateStaking2KoreConf(true);
StakingCoins(true);
Expand Down
2 changes: 2 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ private slots:
void updateStakingIcon(bool staking);
/** Tells underlying optionsModel to update its current display unit. */
void onMenuSelection(QAction* action);

public slots:
void checkStakingTimer();

};
Expand Down
Binary file modified src/qt/res/icons/connect0_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/connect1_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/connect2_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/connect3_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/connect4_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/staking_active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 046ee69

Please sign in to comment.