Database micro-optimization for "tx" network message

Open database once per "tx" message, rather than multiple times,
in the case of orphan transaction presence.

As a side effect, a now-unused CTransaction::AcceptToMemoryPool()
variant is removed.
This commit is contained in:
Jeff Garzik
2012-04-13 17:48:15 -04:00
committed by Jeff Garzik
parent 6b8e7eefcc
commit 9925d34a49
2 changed files with 3 additions and 9 deletions

View File

@@ -684,7 +684,6 @@ public:
bool ClientConnectInputs();
bool CheckTransaction() const;
bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true, bool* pfMissingInputs=NULL);
bool AcceptToMemoryPool(bool fCheckInputs=true, bool* pfMissingInputs=NULL);
protected:
const CTxOut& GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const;