}
// New protocol
- if (pprev == NULL || pprev->nHeight < 10)
+ if (pprev == NULL || pprev->nHeight < 12)
return 1;
const CBlockIndex* currentIndex = pprev;
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);
+ if (nSize < vMsg.size()){
+ vMsg.resize(nSize);
+ }
+
bool fMissingInputs = false;
if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs))
{