mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Merge #7877: Change mapRelay to store CTransactions
38c3102 Change mapRelay to store CTransactions (Pieter Wuille)
This commit is contained in:
@@ -4458,7 +4458,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
bool pushed = false;
|
||||
{
|
||||
LOCK(cs_mapRelay);
|
||||
map<CInv, CDataStream>::iterator mi = mapRelay.find(inv);
|
||||
map<uint256, CTransaction>::iterator mi = mapRelay.find(inv.hash);
|
||||
if (mi != mapRelay.end()) {
|
||||
pfrom->PushMessage(inv.GetCommand(), (*mi).second);
|
||||
pushed = true;
|
||||
@@ -4467,10 +4467,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
if (!pushed && inv.type == MSG_TX) {
|
||||
CTransaction tx;
|
||||
if (mempool.lookup(inv.hash, tx)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << tx;
|
||||
pfrom->PushMessage(NetMsgType::TX, ss);
|
||||
pfrom->PushMessage(NetMsgType::TX, tx);
|
||||
pushed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user