Skip to content

Commit 12ab976

Browse files
committed
Remove legacy neural messaging fields from CNode
1 parent d37a925 commit 12ab976

File tree

5 files changed

+15
-44
lines changed

5 files changed

+15
-44
lines changed

src/main.cpp

+13-6
Original file line numberDiff line numberDiff line change
@@ -4482,13 +4482,20 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
44824482
CAddress addrMe;
44834483
CAddress addrFrom;
44844484
uint64_t nNonce = 1;
4485-
std::string acid = "";
4486-
vRecv >> pfrom->nVersion >> pfrom->boinchashnonce >> pfrom->boinchashpw >> pfrom->cpid >> pfrom->enccpid >> acid >> pfrom->nServices >> nTime >> addrMe;
4485+
std::string legacy_dummy;
4486+
4487+
vRecv >> pfrom->nVersion
4488+
>> legacy_dummy // pfrom->boinchashnonce
4489+
>> legacy_dummy // pfrom->boinchashpw
4490+
>> legacy_dummy // pfrom->cpid
4491+
>> legacy_dummy // pfrom->enccpid
4492+
>> legacy_dummy // acid
4493+
>> pfrom->nServices
4494+
>> nTime
4495+
>> addrMe;
44874496

44884497
if (fDebug10)
4489-
LogPrintf("received aries version %i boinchashnonce %s boinchashpw %s cpid %s enccpid %s acid %s ..."
4490-
,pfrom->nVersion, pfrom->boinchashnonce, pfrom->boinchashpw
4491-
,pfrom->cpid.c_str(), pfrom->enccpid, acid);
4498+
LogPrintf("received aries version %i ...", pfrom->nVersion);
44924499

44934500
int64_t timedrift = std::abs(GetAdjustedTime() - nTime);
44944501

@@ -4546,7 +4553,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
45464553
// 12-5-2015 - Append Trust fields
45474554
pfrom->nTrust = 0;
45484555

4549-
if (!vRecv.empty()) vRecv >> pfrom->sGRCAddress;
4556+
if (!vRecv.empty()) vRecv >> legacy_dummy; // pfrom->sGRCAddress;
45504557

45514558

45524559
// Allow newbies to connect easily with 0 blocks

src/net.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ void CNode::PushVersion()
724724
std::string sboinchashargs;
725725
std::string nonce;
726726
std::string pw1;
727-
std::string mycpid = "INVESTOR";
728-
std::string acid = GetCommandNonce("aries");
727+
std::string mycpid;
728+
std::string acid;
729729

730730
PushMessage("aries", PROTOCOL_VERSION, nonce, pw1,
731731
mycpid, mycpid, acid, nLocalServices, nTime, addrYou, addrMe,
@@ -809,7 +809,6 @@ void CNode::copyStats(CNodeStats &stats)
809809
stats.strSubVer = strSubVer;
810810
stats.fInbound = fInbound;
811811
stats.nStartingHeight = nStartingHeight;
812-
stats.sGRCAddress = sGRCAddress;
813812
stats.nTrust = nTrust;
814813
stats.nMisbehavior = GetMisbehavior();
815814

src/net.h

-12
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ class CNodeStats
149149
double dPingWait;
150150
std::string addrLocal;
151151
int nTrust;
152-
std::string sGRCAddress;
153-
//std::string securityversion;
154152
};
155153

156154

@@ -226,13 +224,6 @@ class CNode
226224
CService addrLocal;
227225
int nVersion;
228226
std::string strSubVer;
229-
std::string boinchashnonce;
230-
std::string boinchashpw;
231-
//12-10-2014 CPID Support
232-
std::string cpid;
233-
std::string enccpid;
234-
std::string NeuralHash;
235-
std::string sGRCAddress;
236227
int nTrust;
237228
////////////////////////
238229

@@ -307,7 +298,6 @@ class CNode
307298
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
308299
nVersion = 0;
309300
strSubVer = "";
310-
//securityversion = "";
311301
fOneShot = false;
312302
fClient = false; // set by version message
313303
fInbound = fInboundIn;
@@ -326,8 +316,6 @@ class CNode
326316
nLastOrphan=0;
327317
nOrphanCount=0;
328318
nOrphanCountViolations=0;
329-
NeuralHash = "";
330-
sGRCAddress = "";
331319
nTrust = 0;
332320
hashCheckpointKnown.SetNull();
333321
setInventoryKnown.max_size(SendBufferSize() / 1000);

src/qt/rpcconsole.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,6 @@ void RPCConsole::clear()
442442
"b { color: #006060; } "
443443
);
444444

445-
//Gridcoin: Find an open neural node for any neural requests from RPC: (7-23-2015)
446-
447-
448445
message(CMD_REPLY, (tr("Welcome to the Gridcoin RPC console! ") + "<br>" +
449446
tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" +
450447
tr("Type <b>help</b> for an overview of available commands.")), true);

src/rpcnet.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -309,22 +309,6 @@ UniValue ping(const UniValue& params, bool fHelp)
309309
return NullUniValue;
310310
}
311311

312-
// Moved to CNode static.
313-
/*
314-
static void CopyNodeStats(std::vector<CNodeStats>& vstats)
315-
{
316-
vstats.clear();
317-
318-
LOCK(cs_vNodes);
319-
vstats.reserve(vNodes.size());
320-
for (auto const& pnode : vNodes) {
321-
CNodeStats stats;
322-
pnode->copyStats(stats);
323-
vstats.push_back(stats);
324-
}
325-
}
326-
*/
327-
328312
UniValue getpeerinfo(const UniValue& params, bool fHelp)
329313
{
330314
if (fHelp || params.size() != 0)
@@ -372,11 +356,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
372356
bool bNeural = false;
373357
bNeural = Contains(stats.strSubVer, "1999");
374358
obj.pushKV("Neural Network", bNeural);
375-
if (bNeural)
376-
{
377-
obj.pushKV("Neural Participant", IsNeuralNodeParticipant(stats.sGRCAddress, GetAdjustedTime()));
378359

379-
}
380360
ret.push_back(obj);
381361
}
382362

0 commit comments

Comments
 (0)