From b7e19de02a65308e3c3bf85496dd02b519681cc2 Mon Sep 17 00:00:00 2001 From: projectmemetic Date: Sat, 9 Feb 2019 18:02:10 -0500 Subject: [PATCH 1/2] Make tx relay expiration configurable with 3 hour default, relay to all nodes. --- src/init.cpp | 1 + src/main.cpp | 4 ++-- src/net.cpp | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index f1c06ceb..5f9b58aa 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -198,6 +198,7 @@ std::string HelpMessage() strUsage += " -seednode= " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n"; strUsage += " -synctimeout= " + _("Specify block download timeout in seconds (default: 60)") + "\n"; strUsage += " -syncspan= " + _("Specify last block age in minutes after which node goes into syncing mode (default: 90)") + "\n"; + strUsage += " -txrelayexpiration= " + _("Specify age in minutes after which transactions expire from the relay pool (default: 180)") + "\n"; strUsage += " -externalip= " + _("Specify your own public address") + "\n"; strUsage += " -onlynet= " + _("Only connect to nodes in network (IPv4, IPv6 or Tor)") + "\n"; strUsage += " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n"; diff --git a/src/main.cpp b/src/main.cpp index f8d07cb8..5ed09d67 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4128,8 +4128,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, vRecv >> pfrom->strSubVer; if (!vRecv.empty()) vRecv >> pfrom->nStartingHeight; - if (!vRecv.empty()) - pfrom->fRelayTxes = true; + + pfrom->fRelayTxes = true; pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); diff --git a/src/net.cpp b/src/net.cpp index dda1677c..22b596d8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -448,7 +448,7 @@ void CNode::PushVersion() RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), addr.ToString()); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, - nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight); + nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight, true); } @@ -1765,8 +1765,9 @@ void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataSt } // Save original serialized message so newer versions are preserved + int nTransactionExpiration = GetArg("-txrelayexpiration", 180); mapRelay.insert(std::make_pair(inv, ss)); - vRelayExpiration.push_back(std::make_pair(GetTime() + 15 * 60, inv)); + vRelayExpiration.push_back(std::make_pair(GetTime() + nTransactionExpiration * 60, inv)); } RelayInventory(inv); From 98f7bbe42c8ec4ec4754712010f00a5ca73ac3c5 Mon Sep 17 00:00:00 2001 From: projectmemetic Date: Sun, 10 Feb 2019 18:33:41 -0500 Subject: [PATCH 2/2] Bump minor version --- pepecoin-qt.pro | 2 +- src/clientversion.h | 2 +- src/version.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pepecoin-qt.pro b/pepecoin-qt.pro index 827e00d9..afe9dbce 100644 --- a/pepecoin-qt.pro +++ b/pepecoin-qt.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = pepecoin-qt -VERSION = 2.9.1.0 +VERSION = 2.9.2.0 INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor QT += network printsupport DEFINES += ENABLE_WALLET diff --git a/src/clientversion.h b/src/clientversion.h index 1edf6ced..102a066e 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -8,7 +8,7 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 2 #define CLIENT_VERSION_MINOR 9 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build diff --git a/src/version.cpp b/src/version.cpp index 6ab60538..e64fcaa2 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -8,7 +8,7 @@ // Name of client reported in the 'version' message. Report the same name // for both bitcoind and bitcoin-qt, to make it harder for attackers to // target servers or GUI users specifically. -const std::string CLIENT_NAME("Memetic-PepeCoin-2.9.1.0"); +const std::string CLIENT_NAME("Memetic-PepeCoin-2.9.2.0"); // Client version number #define CLIENT_VERSION_SUFFIX "-NoBrap"