MCPcopy
hub / github.com/canopy-network/canopy / Hash

Method Hash

lib/block.go:201–201  ·  view source on GitHub ↗

Hash() computes, sets, and returns the BlockHash

()

Source from the content-addressed store, hash-verified

199
200// Hash() computes, sets, and returns the BlockHash
201func (x *Block) Hash() ([]byte, ErrorI) { return x.BlockHeader.SetHash() }
202
203// BytesToBlockHash() converts block bytes into a block hash
204func (x *Block) BytesToBlockHash(blockBytes []byte) (hash []byte, err ErrorI) {

Callers 15

TestCheckBlockFunction · 0.95
TestBlockJSONFunction · 0.95
ConsensusSummaryMethod · 0.45
RecoverPublicKeyFunction · 0.45
HandleRemoteDexBatchMethod · 0.45
newTestQCFunction · 0.45
TestHandleRemoteDexBatchFunction · 0.45
TestDexDepositFunction · 0.45
TestDexWithdrawFunction · 0.45
TestDexSwapFunction · 0.45
TestRotateDexSellBatchFunction · 0.45

Calls 1

SetHashMethod · 0.80

Tested by 13

TestCheckBlockFunction · 0.76
TestBlockJSONFunction · 0.76
newTestQCFunction · 0.36
TestHandleRemoteDexBatchFunction · 0.36
TestDexDepositFunction · 0.36
TestDexWithdrawFunction · 0.36
TestDexSwapFunction · 0.36
TestRotateDexSellBatchFunction · 0.36
TestStartProposePhaseFunction · 0.36