> Add single sha256 call to CHashWriterThis is a partial backport of core#19601
> Add SHA256Uint256 helper functionsThe unbackported part of the PR is currently only used by Bitcoin Core for Taproot related code, so I don't excpect we will need it. The backported method is needed in the `MuHash3072` implementation.
> Refactor Get{Prevout,Sequence,Outputs}Hash to Get{Prevouts,Sequences,Outputs}SHA256.
>
> Several proposals (Taproot, MuHash, CTV) require access to the single
> hash.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19601 | core#19601]]
This backport was previously ignored because I assumed it was only needed for taproot. But it is also a dependency for other features, such as MuHash3072 (improving the performance of `gettxoutsetinfo`).The test vectors are from https://www.di-mgt.com.au/sha_testvectors.html