Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

Commit

Permalink
Fix Nodes and Alert.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElpidioMC committed Jul 5, 2018
1 parent 5dc1eed commit 72268f1
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 15 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions Compilar_Ubuntu18.sh
@@ -0,0 +1,11 @@
# scrypt para instalar la Wallet de BolivarCoin en GNU/Linux

# Actualizar el sistema e instalar dependencias
sudo apt-get install libssl1.0-dev qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev qrencode libqrencode-dev git automake autoconf pkg-config libcurl-openssl1.0-dev libjansson-dev libgmp-dev make g++ gcc-6 g++-6
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

# Compilar la wallet
qmake "USE_QRCODE=1"
make
11 changes: 9 additions & 2 deletions README.md
Expand Up @@ -20,9 +20,16 @@ Escribir en la terminal los siguientes comandos:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
git clone https://github.com/ElpidioMC/bolivarcoin
cd bolivarcoin
git clone https://github.com/ElpidioMC/Bolivarcoin
cd Bolivarcoin

## Para Ubuntu 17.10 y anteriores.
chmod +x compilar.sh
./Compilar.sh
./Bolivarcoin-qt

## Para Ubuntu 18.04 y superiores.
chmod +x compilar.sh
./Compilar_Ubuntu18.sh
./Bolivarcoin-qt
```
42 changes: 32 additions & 10 deletions src/alert.cpp
Expand Up @@ -190,13 +190,41 @@ bool CAlert::ProcessAlert(bool fThread)
nMaxVer == maxInt &&
setSubVer.empty() &&
nPriority == maxInt &&
strStatusBar == "URGENT: Alert key compromised, upgrade required"
strStatusBar == "URGENT: Alert key compromised, upgrade required" &&
strComment == "" &&
strReserved == "" &&
nVersion == 1
))
return false;
}

{
LOCK(cs_mapAlerts);

// Check if this alert has been cancelled
BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts)
{
const CAlert& alert = item.second;
if (alert.Cancels(*this))
{
printf("alert", "alert already cancelled by %d\n", alert.nID);
return false;
}
if (
alert.nExpiration == maxInt &&
alert.nCancel == (maxInt-1) &&
alert.nMinVer == 0 &&
alert.nMaxVer == maxInt &&
alert.setSubVer.empty() &&
alert.nPriority == maxInt &&
alert.strStatusBar == "URGENT: Alert key compromised, upgrade required" &&
alert.strComment == "" &&
alert.strReserved == "" &&
alert.nVersion == 1
) { // If we have a final alert, do not continue
return false;
}
}
// Cancel previous alerts
for (map<uint256, CAlert>::iterator mi = mapAlerts.begin(); mi != mapAlerts.end();)
{
Expand All @@ -217,15 +245,9 @@ bool CAlert::ProcessAlert(bool fThread)
mi++;
}

// Check if this alert has been cancelled
BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts)
{
const CAlert& alert = item.second;
if (alert.Cancels(*this))
{
printf("alert already cancelled by %d\n", alert.nID);
return false;
}
// Do not allow more than 5 concurrent alerts
if (mapAlerts.size() >= 5) {
return false;
}

// Add to mapAlerts
Expand Down
5 changes: 3 additions & 2 deletions src/net.cpp
Expand Up @@ -1192,8 +1192,9 @@ void MapPort(bool)
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strMainNetDNSSeed[][2] = {
{"sytes.net", "159.65.203.140"},
{"128.199.229.71", "107.170.233.106"},
{"159.65.203.140", "159.65.203.140"},
{"128.199.229.71", "128.199.229.71"},
{"107.170.233.106", "107.170.233.106"},
{NULL, NULL}
};

Expand Down
2 changes: 1 addition & 1 deletion src/rpcrawtransaction.cpp 100644 → 100755
Expand Up @@ -239,7 +239,7 @@ Value listunspent(const Array& params, bool fHelp)
CTxDestination address;
if (ExtractDestination(pk, address))
{
const CScriptID& hash = boost::get<const CScriptID&>(address);
const CScriptID& hash = boost::get<CScriptID>(address);
CScript redeemScript;
if (pwalletMain->GetCScript(hash, redeemScript))
entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));
Expand Down

0 comments on commit 72268f1

Please sign in to comment.