aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-04-14 16:04:50 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-04-14 16:24:56 +0200
commit38c310299cfef419d42744362b90c1700b598953 (patch)
tree19e64456f05f18420a322611f772e4b73807846c /src/main.cpp
parent97d0b9889f151449656d6b575f4f864df0f91a80 (diff)
downloadbitcoin-38c310299cfef419d42744362b90c1700b598953.tar.xz
Change mapRelay to store CTransactions
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fff1cc346e..f84fb8dd56 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4456,7 +4456,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;
@@ -4465,10 +4465,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;
}
}