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

Function BytesToBloom

types/bloom9.go:44–48  ·  view source on GitHub ↗

BytesToBloom converts a byte slice to a bloom filter. It panics if b is not of suitable size.

(b []byte)

Source from the content-addressed store, hash-verified

42// BytesToBloom converts a byte slice to a bloom filter.
43// It panics if b is not of suitable size.
44func BytesToBloom(b []byte) Bloom {
45 var bloom Bloom
46 bloom.SetBytes(b)
47 return bloom
48}
49
50// SetBytes sets the content of b to the given bytes.
51// It panics if d is not of suitable size.

Callers 1

CreateBloomFunction · 0.85

Calls 1

SetBytesMethod · 0.95

Tested by

no test coverage detected