Skip to content

Commit

Permalink
Configurable tx relay expiration, tx relay to all nodes, bump minor v…
Browse files Browse the repository at this point in the history
…ersion

Merge pull request #39 from projectmemetic/master
  • Loading branch information
cryptopepe authored Feb 11, 2019
2 parents 042b344 + 98f7bbe commit 53ca32e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pepecoin-qt.pro
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ std::string HelpMessage()
strUsage += " -seednode=<ip> " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n";
strUsage += " -synctimeout=<n> " + _("Specify block download timeout in seconds (default: 60)") + "\n";
strUsage += " -syncspan=<n> " + _("Specify last block age in minutes after which node goes into syncing mode (default: 90)") + "\n";
strUsage += " -txrelayexpiration=<n> " + _("Specify age in minutes after which transactions expire from the relay pool (default: 180)") + "\n";
strUsage += " -externalip=<ip> " + _("Specify your own public address") + "\n";
strUsage += " -onlynet=<net> " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Tor)") + "\n";
strUsage += " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n";
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 3 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>()), nBestHeight);
nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>()), nBestHeight, true);
}


Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 53ca32e

Please sign in to comment.