Inspired by #23819.
CBlockHeader doesn't store its hash, so it has to serialize and hash it again in every call. This PR caches the hash when processing block GETDATA and CMPCTBLOCK requests.
Inspired by #23819.
CBlockHeader doesn't store its hash, so it has to serialize and hash it again in every call. This PR caches the hash when processing block GETDATA and CMPCTBLOCK requests.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process. A summary of reviews will appear here.