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

Method Add

types/bloom9.go:60–64  ·  view source on GitHub ↗

Add adds d to the filter. Future calls of Test(d) will return true.

(d *big.Int)

Source from the content-addressed store, hash-verified

58
59// Add adds d to the filter. Future calls of Test(d) will return true.
60func (b *Bloom) Add(d *big.Int) {
61 bin := new(big.Int).SetBytes(b[:])
62 bin.Or(bin, bloom9(d.Bytes()))
63 b.SetBytes(bin.Bytes())
64}
65
66// Big converts b to a big integer.
67func (b Bloom) Big() *big.Int {

Callers 1

TestBloomFunction · 0.95

Calls 3

SetBytesMethod · 0.95
bloom9Function · 0.85
BytesMethod · 0.65

Tested by 1

TestBloomFunction · 0.76