It is stated that the header of a block does not contain a 'hash' field (see e.g. Bitcoin-Wiki: Block hashing algorithm or Antonopolous' Mastering Bitcoin 2nd Ed.). This makes sense since including such a field would be self-referential.
However, when interrogating the blockchain for info on a specific block for example via bitcoin-cli getblock
a 'hash' field is reported:
{
"hash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
"confirmations": 534047,
"strippedsize": 215,
…
}
Is the "hash" field something that 'bitcoin-cli' calculates and inserts in situ into the json for informational purposes
OR
is it that the "hash" field >is< actually part of the header and my understanding of this aspect is flawed?