diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-04-15 08:58:50 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-04-15 08:59:40 +0200 |
| commit | efc059322ceffbc7485001bebc88dd2fdcb60c4d (patch) | |
| tree | a40c2b481dc74808f0d176d98efefd75db15bd70 /src/main.cpp | |
| parent | Merge #7809: depends: some base fixes/changes (diff) | |
| parent | Change mapRelay to store CTransactions (diff) | |
| download | discoin-efc059322ceffbc7485001bebc88dd2fdcb60c4d.tar.xz discoin-efc059322ceffbc7485001bebc88dd2fdcb60c4d.zip | |
Merge #7877: Change mapRelay to store CTransactions
38c3102 Change mapRelay to store CTransactions (Pieter Wuille)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 63516adae..ed9ee1654 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; } } |