Skip to content

Commit

Permalink
v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Aezora committed Jun 29, 2020
1 parent 642cbe5 commit 3e12659
Show file tree
Hide file tree
Showing 51 changed files with 2,303 additions and 1,924 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ set(COMMON_SOURCES
./src/invalid.cpp
./src/key.cpp
./src/keystore.cpp
./src/netaddress.cpp
./src/netbase.cpp
./src/protocol.cpp
./src/pubkey.cpp
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ More information at [aezora.com](http://www.aezora.com)
<tr><td>Phase 12</td><td>25,000 AZR</td><td>160,001-180,000</td><td>120 AZR</td><td>90% (108 AZR)</td><td>10% (12 AZR)</td></tr>
<tr><td>Phase 13</td><td>30,000 AZR</td><td>180,001-200,000</td><td>135 AZR</td><td>90% (121.5 AZR)</td><td>10% (13.5 AZR)</td></tr>
<tr><td>Phase 14</td><td>40,000 AZR</td><td>200,001-250,000</td><td>150 AZR</td><td>90% (135 AZR)</td><td>10% (15 AZR)</td></tr>
<tr><td>Phase 15</td><td>50,000 AZR</td><td>250,001-300,000</td><td>140 AZR</td><td>90% (126 AZR)</td><td>10% (14 AZR)</td></tr>
<tr><td>Phase 16</td><td>60,000 AZR</td><td>300,001-350,000</td><td>130 AZR</td><td>90% (117 AZR)</td><td>10% (13 AZR)</td></tr>
<tr><td>Phase 17</td><td>70,000 AZR</td><td>350,001-400,000</td><td>120 AZR</td><td>90% (108 AZR)</td><td>10% (12 AZR)</td></tr>
<tr><td>Phase 18</td><td>100,000 AZR</td><td>400,001-500,000</td><td>100 AZR</td><td>90% (90 AZR)</td><td>10% (10 AZR)</td></tr>
<tr><td>Phase 19</td><td>100,000 AZR</td><td>500,001-∞</td><td>100 AZR</td><td>90% (90 AZR)</td><td>10% (10 AZR)</td></tr>
<tr><td>Phase 15</td><td>100,000 AZR</td><td>250,001-300,000</td><td>150 AZR</td><td>90% (135 AZR)</td><td>10% (15 AZR)</td></tr>
<tr><td>Phase 16</td><td>150,000 AZR</td><td>300,001-350,000</td><td>140 AZR</td><td>90% (126 AZR)</td><td>10% (14 AZR)</td></tr>
<tr><td>Phase 17</td><td>200,000 AZR</td><td>350,001-400,000</td><td>130 AZR</td><td>90% (117 AZR)</td><td>10% (13 AZR)</td></tr>
<tr><td>Phase 18</td><td>250,000 AZR</td><td>400,001-500,000</td><td>120 AZR</td><td>90% (108 AZR)</td><td>10% (12 AZR)</td></tr>
<tr><td>Phase 19</td><td>300,000 AZR</td><td>500,001-∞</td><td>100 AZR</td><td>90% (90 AZR)</td><td>10% (10 AZR)</td></tr>
</table>
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
2 changes: 1 addition & 1 deletion share/genbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ git_check_in_repo() {
! { git status --porcelain -uall --ignored "$@" 2>/dev/null || echo '??'; } | grep -q '?'
}

DESC="1.1.2"
DESC="1.1.3"
SUFFIX=""
LAST_COMMIT_DATE=""
if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo share/genbuild.sh; then
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down Expand Up @@ -143,8 +144,9 @@ BITCOIN_CORE_H = \
messagesigner.h \
miner.h \
mruset.h \
netbase.h \
net.h \
netaddress.h \
netbase.h \
noui.h \
policy/fees.h \
pow.h \
Expand Down Expand Up @@ -400,6 +402,7 @@ libbitcoin_common_a_SOURCES = \
invalid.cpp \
key.cpp \
keystore.cpp \
netaddress.cpp \
netbase.cpp \
protocol.cpp \
pubkey.cpp \
Expand Down
20 changes: 12 additions & 8 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "masternodeconfig.h"
#include "masternodeman.h"
#include "messagesigner.h"
#include "netbase.h"
#include "protocol.h"
#include "spork.h"

//
// Bootup the Masternode, look for a 10000 AEZORA input and register on the network
Expand Down Expand Up @@ -67,11 +67,14 @@ void CActiveMasternode::ManageStatus()
return;
}
} else {
service = CService(strMasterNodeAddr);
int nPort;
std::string strHost;
SplitHostPort(strMasterNodeAddr, nPort, strHost);
service = LookupNumeric(strHost.c_str(), nPort);
}

// The service needs the correct default port to work properly
if(!CMasternodeBroadcast::CheckDefaultPort(strMasterNodeAddr, errorMessage, "CActiveMasternode::ManageStatus()"))
if (!CMasternodeBroadcast::CheckDefaultPort(service, errorMessage, "CActiveMasternode::ManageStatus()"))
return;

LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());
Expand Down Expand Up @@ -238,15 +241,16 @@ bool CActiveMasternode::CreateBroadcast(std::string strService, std::string strK
return false;
}

CService service = CService(strService);
int nPort;
std::string strHost;
SplitHostPort(strService, nPort, strHost);
CService _service(LookupNumeric(strHost.c_str(), nPort));

// The service needs the correct default port to work properly
if(!CMasternodeBroadcast::CheckDefaultPort(strService, errorMessage, "CActiveMasternode::CreateBroadcast()"))
if (!CMasternodeBroadcast::CheckDefaultPort(_service, errorMessage, "CActiveMasternode::CreateBroadcast()"))
return false;

addrman.Add(CAddress(service, NODE_NETWORK), CNetAddr("127.0.0.1"), 2 * 60 * 60);

return CreateBroadcast(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage, mnb);
return CreateBroadcast(vin, _service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage, mnb);
}

bool CActiveMasternode::CreateBroadcast(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, std::string& errorMessage, CMasternodeBroadcast &mnb)
Expand Down
2 changes: 1 addition & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef BITCOIN_ADDRMAN_H
#define BITCOIN_ADDRMAN_H

#include "netbase.h"
#include "netaddress.h"
#include "protocol.h"
#include "random.h"
#include "sync.h"
Expand Down
1 change: 1 addition & 0 deletions src/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class CFeeRate
friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
friend bool operator<=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK <= b.nSatoshisPerK; }
friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
CFeeRate& operator+=(const CFeeRate& a) { nSatoshisPerK += a.nSatoshisPerK; return *this; }
std::string ToString() const;

ADD_SERIALIZE_METHODS;
Expand Down
3 changes: 2 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
(181752, uint256S("3da55ef79f2c5166691074bddae58e5c6a2982ad0658577527f4ea8cdabe37e8"))
(206658, uint256S("68aab2ab67180adf11cb798b3573ff2bc5430ebd74d621edbb6fbbb15fd9a025"))
(206909, uint256S("e7eecf22044f71b2328a8596588725a5e8a361530b3c5dd190acba400d01d263"))
(210430, uint256S("1af22142eb19dc446e5821e86a1864707a2a314baafcaae286c825d9643338a9"));
(210430, uint256S("1af22142eb19dc446e5821e86a1864707a2a314baafcaae286c825d9643338a9"))
(246540, uint256S("c9a69447fa8f491f41d41cb76a2c8174eeaed739a0c2dd10e915a021436c124c"));
static const Checkpoints::CCheckpointData data = {
&mapCheckpoints,
1577461410, // * UNIX timestamp of last checkpoint block
Expand Down
13 changes: 9 additions & 4 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,17 @@ static bool ClientAllowed(const CNetAddr& netaddr)
static bool InitHTTPAllowList()
{
rpc_allow_subnets.clear();
rpc_allow_subnets.push_back(CSubNet("127.0.0.0/8")); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet("::1")); // always allow IPv6 localhost
CNetAddr localv4;
CNetAddr localv6;
LookupHost("127.0.0.1", localv4, false);
LookupHost("::1", localv6, false);
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
if (mapMultiArgs.count("-rpcallowip")) {
const std::vector<std::string>& vAllow = mapMultiArgs["-rpcallowip"];
for (std::string strAllow : vAllow) {
CSubNet subnet(strAllow);
CSubNet subnet;
LookupSubNet(strAllow.c_str(), subnet);
if (!subnet.IsValid()) {
uiInterface.ThreadSafeMessageBox(
strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),
Expand Down Expand Up @@ -630,7 +635,7 @@ CService HTTPRequest::GetPeer()
const char* address = "";
uint16_t port = 0;
evhttp_connection_get_peer(con, (char**)&address, &port);
peer = CService(address, port);
peer = LookupNumeric(address, port);
}
return peer;
}
Expand Down
44 changes: 40 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "masternodeman.h"
#include "messagesigner.h"
#include "miner.h"
#include "netbase.h"
#include "net.h"
#include "rpc/server.h"
#include "script/standard.h"
Expand Down Expand Up @@ -390,6 +391,8 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-loadblock=<file>", _("Imports blocks from external blk000??.dat file") + " " + _("on startup"));
strUsage += HelpMessageOpt("-maxreorg=<n>", strprintf(_("Set the Maximum reorg depth (default: %u)"), DEFAULT_MAX_REORG_DEPTH));
strUsage += HelpMessageOpt("-maxorphantx=<n>", strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS));
strUsage += HelpMessageOpt("-maxmempool=<n>", strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"), DEFAULT_MAX_MEMPOOL_SIZE));
strUsage += HelpMessageOpt("-mempoolexpiry=<n>", strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"), DEFAULT_MEMPOOL_EXPIRY));
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
#ifndef WIN32
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "aezorad.pid"));
Expand Down Expand Up @@ -494,6 +497,10 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-flushwallet", strprintf(_("Run a thread to flush wallet periodically (default: %u)"), 1));
strUsage += HelpMessageOpt("-maxreorg", strprintf(_("Use a custom max chain reorganization depth (default: %u)"), 100));
strUsage += HelpMessageOpt("-stopafterblockimport", strprintf(_("Stop running after importing blocks from disk (default: %u)"), 0));
strUsage += HelpMessageOpt("-limitancestorcount=<n>", strprintf(_("Do not accept transactions if number of in-mempool ancestors is <n> or more (default: %u)"), DEFAULT_ANCESTOR_LIMIT));
strUsage += HelpMessageOpt("-limitancestorsize=<n>", strprintf(_("Do not accept transactions whose size with all in-mempool ancestors exceeds <n> kilobytes (default: %u)"), DEFAULT_ANCESTOR_SIZE_LIMIT));
strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf(_("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)"), DEFAULT_DESCENDANT_LIMIT));
strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf(_("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u)."), DEFAULT_DESCENDANT_SIZE_LIMIT));
strUsage += HelpMessageOpt("-sporkkey=<privkey>", _("Enable spork administration functionality with the appropriate private key."));
}
strUsage += HelpMessageOpt("-debug=<category>", strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + ". " +
Expand Down Expand Up @@ -984,15 +991,31 @@ bool AppInit2()
// Check level must be 4 for zerocoin checks
if (mapArgs.count("-checklevel"))
return UIError(_("Error: Unsupported argument -checklevel found. Checklevel must be level 4."));
// Exit early if -masternode=1 and -listen=0
if (GetBoolArg("-masternode", false) && !GetBoolArg("-listen", true))
return UIError(_("Error: -listen must be true if -masternode is set."));
// Exit early if -masternode=1 and -port is not the default port
if (GetBoolArg("-masternode", false) && GetListenPort() != Params().GetDefaultPort())
return UIError(strprintf(_("Error: Invalid port %d for running a masternode."), GetListenPort()) + "\n\n" +
strprintf(_("Masternodes are required to run on port %d for %s-net"), Params().GetDefaultPort(), Params().NetworkIDString()));

if (GetBoolArg("-benchmark", false))
UIWarning(_("Warning: Unsupported argument -benchmark ignored, use -debug=bench."));

// Checkmempool and checkblockindex default to true in regtest mode
mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultConsistencyChecks()));
int ratio = std::min<int>(std::max<int>(GetArg("-checkmempool", Params().DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
if (ratio != 0) {
mempool.setSanityCheck(1.0 / ratio);
}
fCheckBlockIndex = GetBoolArg("-checkblockindex", Params().DefaultConsistencyChecks());
Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);

// -mempoollimit limits
int64_t nMempoolSizeLimit = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
int64_t nMempoolDescendantSizeLimit = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000;
if (nMempoolSizeLimit < 0 || nMempoolSizeLimit < nMempoolDescendantSizeLimit * 40)
return UIError(strprintf(_("Error: -maxmempool must be at least %d MB"), GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) / 25));

// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
if (nScriptCheckThreads <= 0)
Expand Down Expand Up @@ -1308,7 +1331,8 @@ bool AppInit2()

if (mapArgs.count("-whitelist")) {
for (const std::string& net : mapMultiArgs["-whitelist"]) {
CSubNet subnet(net);
CSubNet subnet;
LookupSubNet(net.c_str(), subnet);
if (!subnet.IsValid())
return UIError(strprintf(_("Invalid netmask specified in -whitelist: '%s'"), net));
CNode::AddWhitelistedRange(subnet);
Expand Down Expand Up @@ -1926,9 +1950,21 @@ bool AppInit2()
LogPrintf(" addr %s\n", strMasterNodeAddr.c_str());

if (!strMasterNodeAddr.empty()) {
CService addrTest = CService(strMasterNodeAddr);
int nPort;
int nDefaultPort = Params().GetDefaultPort();
std::string strHost;
SplitHostPort(strMasterNodeAddr, nPort, strHost);

// Allow for the port number to be omitted here and just double check
// that if a port is supplied, it matches the required default port.
if (nPort == 0) nPort = nDefaultPort;
if (nPort != nDefaultPort) {
return UIError(strprintf(_("Invalid -masternodeaddr port %d, only %d is supported on %s-net."),
nPort, nDefaultPort, Params().NetworkIDString()));
}
CService addrTest(LookupNumeric(strHost.c_str(), nPort));
if (!addrTest.IsValid()) {
return UIError("Invalid -masternodeaddr address: " + strMasterNodeAddr);
return UIError(strprintf(_("Invalid -masternodeaddr address: %s"), strMasterNodeAddr));
}
}

Expand Down
Loading

0 comments on commit 3e12659

Please sign in to comment.