bitcoin/bitcoin — pull request #2871 by gavinandresen (2013-08-02 06:13:53+00:00)
Title: Simplify storage of orphan transactions, fix CVE-2013-4627

Orphan transactions were stored as a CDataStream pointer; this changes the mapOrphanTransactions data structures to store orphans as a CTransaction.

This also fixes CVE-2013-4627 by always re-serializing transactions before relaying them.

And I cleaned up the "tx" message-handling code a little (it was re-using 'inv' and 'tx' variables, which is error-prone and confusing).