Skip to content

Commit

Permalink
Merge pull request #147 from AXErunners/development
Browse files Browse the repository at this point in the history
release 1.3.0
  • Loading branch information
charlesrocket authored Apr 5, 2019
2 parents 5a3ad4f + 209656f commit 20c419f
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 744 deletions.
6 changes: 3 additions & 3 deletions ci/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ elif [ "$BUILD_TARGET" = "win32" ]; then
export DPKG_ADD_ARCH="i386"
export DEP_OPTS="NO_QT=1"
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-stable wine32 bc"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
export DIRECT_WINE_EXEC_TESTS=true
export RUN_TESTS=true
elif [ "$BUILD_TARGET" = "win64" ]; then
export HOST=x86_64-w64-mingw32
export DPKG_ADD_ARCH="i386"
export DEP_OPTS="NO_QT=1"
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-stable wine64 bc"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
export DIRECT_WINE_EXEC_TESTS=true
export RUN_TESTS=true
elif [ "$BUILD_TARGET" = "linux32" ]; then
Expand Down Expand Up @@ -82,7 +82,7 @@ elif [ "$BUILD_TARGET" = "linux64_release" ]; then
elif [ "$BUILD_TARGET" = "mac" ]; then
export HOST=x86_64-apple-darwin11
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
export OSX_SDK=10.11
export GOAL="deploy"
fi
16 changes: 14 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
Expand Down Expand Up @@ -192,6 +192,17 @@ AC_ARG_ENABLE([debug],
[enable_debug=$enableval],
[enable_debug=no])

# Enable in-wallet miner
AC_ARG_ENABLE([miner],
[AS_HELP_STRING([--enable-miner],
[enable in-wallet miner (default is yes)])],
[enable_miner=$enableval],
[enable_miner=yes])
AM_CONDITIONAL([ENABLE_MINER], [test x$enable_miner = xyes])
if test "x$enable_miner" = xyes; then
AC_DEFINE(ENABLE_MINER, 1, [Define this symbol if in-wallet miner should be enabled])
fi

# Turn warnings into errors
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror],
Expand Down Expand Up @@ -1181,6 +1192,7 @@ echo " with test = $use_tests"
echo " with bench = $use_bench"
echo " with upnp = $use_upnp"
echo " debug enabled = $enable_debug"
echo " miner enabled = $enable_miner"
echo " werror = $enable_werror"
echo
echo " target os = $TARGET_OS"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "axe-linux-1.2"
name: "axe-linux-1.3"
enable_cache: true
suites:
- "bionic"
Expand Down
4 changes: 2 additions & 2 deletions contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "axe-osx-1.2"
name: "axe-osx-1.3"
enable_cache: true
suites:
- "bionic"
Expand Down Expand Up @@ -37,7 +37,7 @@ files:
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin11"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
Expand Down
4 changes: 2 additions & 2 deletions contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "axe-win-1.2"
name: "axe-win-1.3"
enable_cache: true
suites:
- "bionic"
Expand Down Expand Up @@ -31,7 +31,7 @@ files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests"
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
HOST_CFLAGS="-O2 -g"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PROJECT_NAME = "Axe Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.2.2.0
PROJECT_NUMBER = 1.3.0.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
748 changes: 26 additions & 722 deletions doc/release-notes.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

//! These need to be macros, as clientversion.cpp's and axe*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 3
#define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

//! Set to true for release, false for prerelease or test build
Expand Down
17 changes: 16 additions & 1 deletion src/governance-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,21 @@ bool CGovernanceObject::ProcessVote(CNode* pfrom,
LogPrint("gobject", "%s\n", ostr.str());
exception = CGovernanceException(ostr.str(), GOVERNANCE_EXCEPTION_NONE);
return false;
} else if (vote.GetTimestamp() == voteInstanceRef.nCreationTime) {
// Someone is doing smth fishy, there can be no two votes from the same masternode
// with the same timestamp for the same object and signal and yet different hash/outcome.
std::ostringstream ostr;
ostr << "CGovernanceObject::ProcessVote -- Invalid vote, same timestamp for the different outcome";
if (vote.GetOutcome() < voteInstanceRef.eOutcome) {
// This is an arbitrary comparison, we have to agree on some way
// to pick the "winning" vote.
ostr << ", rejected";
LogPrint("gobject", "%s\n", ostr.str());
exception = CGovernanceException(ostr.str(), GOVERNANCE_EXCEPTION_NONE);
return false;
}
ostr << ", accepted";
LogPrint("gobject", "%s\n", ostr.str());
}

int64_t nNow = GetAdjustedTime();
Expand All @@ -172,9 +187,9 @@ bool CGovernanceObject::ProcessVote(CNode* pfrom,
<< ", time delta = " << nTimeDelta;
LogPrint("gobject", "%s\n", ostr.str());
exception = CGovernanceException(ostr.str(), GOVERNANCE_EXCEPTION_TEMPORARY_ERROR);
nVoteTimeUpdate = nNow;
return false;
}
nVoteTimeUpdate = nNow;
}

bool onlyVotingKeyAllowed = nObjectType == GOVERNANCE_OBJECT_PROPOSAL && vote.GetSignal() == VOTE_SIGNAL_FUNDING;
Expand Down
8 changes: 3 additions & 5 deletions src/merkleblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
for (unsigned int i = 0; i < block.vtx.size(); i++)
{
const auto& tx = *block.vtx[i];
if (tx.nVersion == 3 && !allowedTxTypes.count(tx.nType)) {
continue;
}

const uint256& hash = tx.GetHash();
if (filter.IsRelevantAndUpdate(tx))
bool isAllowedType = tx.nVersion != 3 || allowedTxTypes.count(tx.nType) != 0;

if (isAllowedType && filter.IsRelevantAndUpdate(tx))
{
vMatch.push_back(true);
vMatchedTxn.push_back(std::make_pair(i, hash));
Expand Down
2 changes: 2 additions & 0 deletions src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ class CRPCConvertParam
static const CRPCConvertParam vRPCConvertParams[] =
{
{ "setmocktime", 0, "timestamp" },
#if ENABLE_MINER
{ "generate", 0, "nblocks" },
{ "generate", 1, "maxtries" },
{ "generatetoaddress", 0, "nblocks" },
{ "generatetoaddress", 2, "maxtries" },
#endif // ENABLE_MINER
{ "getnetworkhashps", 0, "nblocks" },
{ "getnetworkhashps", 1, "height" },
{ "sendtoaddress", 1, "amount" },
Expand Down
5 changes: 4 additions & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ UniValue getnetworkhashps(const JSONRPCRequest& request)
return GetNetworkHashPS(request.params.size() > 0 ? request.params[0].get_int() : 120, request.params.size() > 1 ? request.params[1].get_int() : -1);
}

#if ENABLE_MINER
UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nGenerate, uint64_t nMaxTries, bool keepScript)
{
static const int nInnerLoopCount = 0x10000;
Expand Down Expand Up @@ -222,6 +223,7 @@ UniValue generatetoaddress(const JSONRPCRequest& request)

return generateBlocks(coinbaseScript, nGenerate, nMaxTries, false);
}
#endif // ENABLE_MINER

UniValue getmininginfo(const JSONRPCRequest& request)
{
Expand Down Expand Up @@ -971,9 +973,10 @@ static const CRPCCommand commands[] =
{ "mining", "getblocktemplate", &getblocktemplate, true, {"template_request"} },
{ "mining", "submitblock", &submitblock, true, {"hexdata","parameters"} },

#if ENABLE_MINER
{ "generating", "generate", &generate, true, {"nblocks","maxtries"} },
{ "generating", "generatetoaddress", &generatetoaddress, true, {"nblocks","address","maxtries"} },

#endif // ENABLE_MINER
{ "util", "estimatefee", &estimatefee, true, {"nblocks"} },
{ "util", "estimatepriority", &estimatepriority, true, {"nblocks"} },
{ "util", "estimatesmartfee", &estimatesmartfee, true, {"nblocks"} },
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/rpcevo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ UniValue protx_revoke(const JSONRPCRequest& request)

if (request.params.size() > 3) {
int32_t nReason = ParseInt32V(request.params[3], "reason");
if (nReason < 0 || nReason >= CProUpRevTx::REASON_LAST) {
if (nReason < 0 || nReason > CProUpRevTx::REASON_LAST) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("invalid reason %d, must be between 0 and %d", nReason, CProUpRevTx::REASON_LAST));
}
ptx.nReason = (uint16_t)nReason;
Expand Down
2 changes: 1 addition & 1 deletion src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ std::map<int, int64_t> mapSporkDefaults = {
{SPORK_10_MASTERNODE_PAY_UPDATED_NODES, 0}, // ON
{SPORK_12_RECONSIDER_BLOCKS, 0}, // 0 BLOCKS
{SPORK_14_REQUIRE_SENTINEL_FLAG, 4070908800ULL}, // OFF
{SPORK_16_INSTANTSEND_AUTOLOCKS, 0}, // ON
{SPORK_15_DETERMINISTIC_MNS_ENABLED, 0}, // ON
{SPORK_16_INSTANTSEND_AUTOLOCKS, 4070908800ULL}, // OFF
{SPORK_17_QUORUM_DKG_ENABLED, 4070908800ULL}, // OFF
};

Expand Down
2 changes: 2 additions & 0 deletions src/test/rpc_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
BOOST_CHECK_EQUAL(adr.get_str(), "2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128");
}

#if ENABLE_MINER
BOOST_AUTO_TEST_CASE(rpc_convert_values_generatetoaddress)
{
UniValue result;
Expand All @@ -342,6 +343,7 @@ BOOST_AUTO_TEST_CASE(rpc_convert_values_generatetoaddress)
BOOST_CHECK_EQUAL(result[1].get_str(), "yTG8jLL3MvteKXgbEcHyaN7JvTPCejQpSh");
BOOST_CHECK_EQUAL(result[2].get_int(), 9);
}
#endif // ENABLE_MINER

BOOST_AUTO_TEST_CASE(rpc_sentinel_ping)
{
Expand Down
5 changes: 5 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4504,6 +4504,11 @@ static const uint64_t MEMPOOL_DUMP_VERSION = 1;

bool LoadMempool(void)
{
if (GetBoolArg("-zapwallettxes", false)) {
LogPrintf("Skipping mempool.dat because of zapwallettxes\n");
return true;
}

int64_t nExpiryTimeout = GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60;
FILE* filestr = fopen((GetDataDir() / "mempool.dat").string().c_str(), "rb");
CAutoFile file(filestr, SER_DISK, CLIENT_VERSION);
Expand Down

0 comments on commit 20c419f

Please sign in to comment.