aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-08-02 15:50:04 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-08-02 15:50:04 +1000
commit8f6f92c72bc560ecf8d12fc7235a3e2222d7c033 (patch)
tree7bd15d4a8943435e448c424c7dc0e0e8d184ec7e /src/main.cpp
parent6d89611c3aaa85798c4d70d20e35e6bcb7bdd5c0 (diff)
downloadbitcoin-8f6f92c72bc560ecf8d12fc7235a3e2222d7c033.tar.xz
Revert "Truncate oversize 'tx' messages before relaying/storing."
This reverts commit c40a5aaaf484855a4350fd702e8e72fd21a68155.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ac3ee06f6f..d9ddb166cb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3598,16 +3598,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
CInv inv(MSG_TX, tx.GetHash());
pfrom->AddInventoryKnown(inv);
- // Truncate messages to the size of the tx in them
- unsigned int nSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
- unsigned int oldSize = vMsg.size();
- if (nSize < oldSize) {
- vMsg.resize(nSize);
- printf("truncating oversized TX %s (%u -> %u)\n",
- tx.GetHash().ToString().c_str(),
- oldSize, nSize);
- }
-
bool fMissingInputs = false;
CValidationState state;
if (mempool.accept(state, tx, true, &fMissingInputs))