Allow "inv" to be sent from superlite client
This commit is contained in:
@@ -8243,8 +8243,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
state.fShouldBan = false;
|
||||
}
|
||||
komodo_nSPV(pto);
|
||||
if ( KOMODO_NSPV != 0 )
|
||||
return(true);
|
||||
if ( KOMODO_NSPV == 0 )
|
||||
{
|
||||
BOOST_FOREACH(const CBlockReject& reject, state.rejects)
|
||||
pto->PushMessage("reject", (string)"block", reject.chRejectCode, reject.strRejectReason, reject.hashBlock);
|
||||
state.rejects.clear();
|
||||
@@ -8271,7 +8271,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
{
|
||||
GetMainSignals().Broadcast(nTimeBestReceived);
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// Message: inventory
|
||||
//
|
||||
@@ -8319,7 +8319,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
}
|
||||
if (!vInv.empty())
|
||||
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) {
|
||||
|
||||
@@ -1897,7 +1897,6 @@ void RelayTransaction(const CTransaction& tx)
|
||||
|
||||
void RelayTransaction(const CTransaction& tx, const CDataStream& ss)
|
||||
{
|
||||
fprintf(stderr,"RelayTransaction\n");
|
||||
CInv inv(MSG_TX, tx.GetHash());
|
||||
{
|
||||
LOCK(cs_mapRelay);
|
||||
@@ -1915,10 +1914,8 @@ void RelayTransaction(const CTransaction& tx, const CDataStream& ss)
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
{
|
||||
fprintf(stderr,"pnode relay tx.%d\n",(int32_t)pnode->fRelayTxes);
|
||||
if(!pnode->fRelayTxes)
|
||||
continue;
|
||||
fprintf(stderr,"found pnode\n");
|
||||
LOCK(pnode->cs_filter);
|
||||
if (pnode->pfilter)
|
||||
{
|
||||
|
||||
@@ -1342,7 +1342,6 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
|
||||
}
|
||||
}
|
||||
RelayTransaction(tx);
|
||||
|
||||
return hashTx.GetHex();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user