From 64dd46fd05de1dd8ff5066e192e1345f733c6a1f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 8 Jul 2012 00:06:34 +0200 Subject: Transaction hash caching Use CBlock's vMerkleTree to cache transaction hashes, and pass them along as argument in more function calls. During initial block download, this results in every transaction's hash to be only computed once. --- src/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet.h') diff --git a/src/wallet.h b/src/wallet.h index 8c98f34a5a..43b695c597 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -162,7 +162,7 @@ public: void MarkDirty(); bool AddToWallet(const CWalletTx& wtxIn); - bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false, bool fFindBlock = false); + bool AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate = false, bool fFindBlock = false); bool EraseFromWallet(uint256 hash); void WalletUpdateSpent(const CTransaction& prevout); int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false); -- cgit v1.2.3