MCPcopy Create free account
hub / github.com/CPChain/chain / Hash

Method Hash

types/block.go:162–164  ·  view source on GitHub ↗

Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding.

()

Source from the content-addressed store, hash-verified

160// Hash returns the block hash of the header, which is simply the keccak256 hash of its
161// RLP encoding.
162func (h *Header) Hash() common.Hash {
163 return sigHash(h)
164}
165
166// sigHash returns hash of header
167func sigHash(header *Header) (hash common.Hash) {

Callers 11

MarshalJSONMethod · 0.95
MarshalTOMLMethod · 0.95
makeChainForBenchFunction · 0.95
testChainIndexerFunction · 0.95
TestHeaderStorageFunction · 0.95
GetSnapshotMethod · 0.95
Test_ecrecoverFunction · 0.95
verifyBasicMethod · 0.95
snapshotMethod · 0.95

Calls 1

sigHashFunction · 0.70

Tested by 6

makeChainForBenchFunction · 0.76
testChainIndexerFunction · 0.76
TestHeaderStorageFunction · 0.76
Test_ecrecoverFunction · 0.76