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