fix relay bug (#1178)
This commit is contained in:
parent
d9fb724943
commit
c3e5757c25
17
src/main.cpp
17
src/main.cpp
@ -5056,16 +5056,19 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
|||||||
{
|
{
|
||||||
// Send stream from relay memory
|
// Send stream from relay memory
|
||||||
bool pushed = false;
|
bool pushed = false;
|
||||||
map<CInv, CDataStream>::iterator mi;
|
|
||||||
{
|
{
|
||||||
LOCK(cs_mapRelay);
|
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
mi = mapRelay.find(inv);
|
{
|
||||||
if (mi != mapRelay.end()) {
|
LOCK(cs_mapRelay);
|
||||||
pushed = true;
|
map<CInv, CDataStream>::iterator mi = mapRelay.find(inv);
|
||||||
|
if (mi != mapRelay.end()) {
|
||||||
|
ss += (*mi).second;
|
||||||
|
pushed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if(pushed)
|
||||||
|
pfrom->PushMessage(inv.GetCommand(), ss);
|
||||||
}
|
}
|
||||||
if(pushed)
|
|
||||||
pfrom->PushMessage(inv.GetCommand(), (*mi).second);
|
|
||||||
|
|
||||||
if (!pushed && inv.type == MSG_TX) {
|
if (!pushed && inv.type == MSG_TX) {
|
||||||
CTransaction tx;
|
CTransaction tx;
|
||||||
|
Loading…
Reference in New Issue
Block a user