MCPcopy Create free account
hub / github.com/ethstorage/es-node / TestMaskData

Function TestMaskData

ethstorage/pora/ethash_test.go:13–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestMaskData(t *testing.T) {
14 fullMask := GetMaskData(0, common.Hash{}, 128, nil)
15 partialMask := GetMaskData(0, common.Hash{}, 7, nil)
16 if !bytes.Equal(fullMask[0:len(partialMask)], partialMask) {
17 t.Errorf("partial mask data wrong")
18 }
19
20 fullMask = GetMaskData(0, common.Hash{}, 4096, nil)
21 partialMask = GetMaskData(0, common.Hash{}, 4095, nil)
22 if !bytes.Equal(fullMask[0:len(partialMask)], partialMask) {
23 t.Errorf("partial mask data wrong")
24 }
25}

Callers

nothing calls this directly

Calls 1

GetMaskDataFunction · 0.85

Tested by

no test coverage detected