diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-23 06:48:17 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-23 06:48:17 -0800 |
commit | 1a2e45d8d50d22929ab12ae68189e6171907dba5 (patch) | |
tree | 9cd7c7ea8dbf7aa40299ef2dca6de2d654a076e9 /src/main.cpp | |
parent | d40c164369ef4df7c37e8c25a0fa6955a4dbcbb1 (diff) | |
parent | 192cc910ec7cade1d0dce7f3b111e7fc7720e607 (diff) |
Merge pull request #2188 from TheBlueMatt/bloom
Send transactions after a CMerkleBlock when asked for it in an inv.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index fca12b7cb8..adc4ac0d25 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3260,6 +3260,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (pfrom->pfilter) { CMerkleBlock merkleBlock(block, *pfrom->pfilter); + pfrom->PushMessage("merkleblock", merkleBlock); // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see // This avoids hurting performance by pointlessly requiring a round-trip // Note that there is currently no way for a node to request any single transactions we didnt send here - @@ -3270,7 +3271,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) BOOST_FOREACH(PairType& pair, merkleBlock.vMatchedTxn) if (!pfrom->setInventoryKnown.count(CInv(MSG_TX, pair.second))) pfrom->PushMessage("tx", block.vtx[pair.first]); - pfrom->PushMessage("merkleblock", merkleBlock); } // else // no response @@ -3581,7 +3581,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object, // and thus, the maximum size any matched object can have) in a filteradd message - if (vData.size() > 520) + if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) { pfrom->Misbehaving(100); } else { |