mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
Revert "Truncate oversize 'tx' messages before relaying/storing."
This reverts commit c40a5aaaf4
.
This commit is contained in:
parent
6d89611c3a
commit
8f6f92c72b
1 changed files with 0 additions and 10 deletions
10
src/main.cpp
10
src/main.cpp
|
@ -3598,16 +3598,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||||
CInv inv(MSG_TX, tx.GetHash());
|
CInv inv(MSG_TX, tx.GetHash());
|
||||||
pfrom->AddInventoryKnown(inv);
|
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;
|
bool fMissingInputs = false;
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (mempool.accept(state, tx, true, &fMissingInputs))
|
if (mempool.accept(state, tx, true, &fMissingInputs))
|
||||||
|
|
Loading…
Reference in a new issue