Browse Source

Revert "Truncate oversize 'tx' messages before relaying/storing."

This reverts commit 7cc960f8f5.
0.8
Gavin Andresen 11 years ago committed by Warren Togami
parent
commit
b1f636b161
  1. 10
      src/main.cpp

10
src/main.cpp

@ -3521,16 +3521,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -3521,16 +3521,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 (tx.AcceptToMemoryPool(state, true, true, &fMissingInputs))

Loading…
Cancel
Save