Alternative to #8422.
This version simply precomputes the 3 overall hashes once per transaction, resulting in no more cache that needs updating during validation.
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
utACK 67a2091463b7d9f3d33d86fb42a6feab127a9487 will test and time it soon. I prefer this version as well.
Prefer the simplicity of this one.
code review ACK and lightly tACK(it syncs testnet) https://github.com/bitcoin/bitcoin/pull/8524/commits/ab48c5e72156b34300db4a6521cb3c9969be3937
utACK ab48c5e
97 | @@ -98,13 +98,20 @@ enum 98 | 99 | bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror); 100 | 101 | +struct CachedHashes
Nit: this struct name is too general, maybe CachedTransactionHashes?
It's actually not a cache either anymore.
What about PrecomputedTransactionData ?
Added a commit.
utACK ab48c5e, nice to get rid of some TODOs and spurious hashing
utACK 35fe039