Revert
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -8241,9 +8241,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
state.fShouldBan = false;
|
||||
}
|
||||
komodo_nSPV(pto);
|
||||
bool fFetch = false;
|
||||
if ( KOMODO_NSPV == 0 )
|
||||
{
|
||||
if ( KOMODO_NSPV != 0 )
|
||||
return(true);
|
||||
BOOST_FOREACH(const CBlockReject& reject, state.rejects)
|
||||
pto->PushMessage("reject", (string)"block", reject.chRejectCode, reject.strRejectReason, reject.hashBlock);
|
||||
state.rejects.clear();
|
||||
@@ -8251,7 +8250,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
// Start block sync
|
||||
if (pindexBestHeader == NULL)
|
||||
pindexBestHeader = chainActive.Tip();
|
||||
fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do.
|
||||
bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do.
|
||||
if (!state.fSyncStarted && !pto->fClient && !fImporting && !fReindex && pindexBestHeader!=0) {
|
||||
// Only actively request headers from a single peer, unless we're close to today.
|
||||
if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) {
|
||||
@@ -8270,7 +8269,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
{
|
||||
GetMainSignals().Broadcast(nTimeBestReceived);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Message: inventory
|
||||
//
|
||||
@@ -8317,12 +8316,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
pto->vInventoryToSend = vInvWait;
|
||||
}
|
||||
if (!vInv.empty())
|
||||
{
|
||||
fprintf(stderr,"send inv message\n");
|
||||
pto->PushMessage("inv", vInv);
|
||||
}
|
||||
if ( KOMODO_NSPV != 0 )
|
||||
return(true);
|
||||
|
||||
// Detect whether we're stalling
|
||||
int64_t nNow = GetTimeMicros();
|
||||
if (!pto->fDisconnect && state.nStallingSince && state.nStallingSince < nNow - 1000000 * BLOCK_STALLING_TIMEOUT) {
|
||||
|
||||
Reference in New Issue
Block a user