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.
This commit is contained in:
Pieter Wuille
2012-07-08 00:06:34 +02:00
parent ae8bfd12da
commit 64dd46fd05
5 changed files with 32 additions and 27 deletions

View File

@@ -517,7 +517,7 @@ Value sendrawtransaction(const Array& params, bool fHelp)
// Not in block, but already in the memory pool; will drop
// through to re-relay it.
} else {
SyncWithWallets(tx, NULL, true);
SyncWithWallets(hashTx, tx, NULL, true);
}
RelayMessage(CInv(MSG_TX, hashTx), tx);