mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 12:27:18 +00:00
9d2bdfe14d
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
25 lines
497 B
Go
25 lines
497 B
Go
//go:build go1.18
|
|
// +build go1.18
|
|
|
|
package p2p_test
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/encoder"
|
|
)
|
|
|
|
func FuzzMsgID(f *testing.F) {
|
|
validTopic := fmt.Sprintf(p2p.BlockSubnetTopicFormat, []byte{0xb5, 0x30, 0x3f, 0x2a}) + "/" + encoder.ProtocolSuffixSSZSnappy
|
|
f.Add(validTopic)
|
|
|
|
f.Fuzz(func(t *testing.T, topic string) {
|
|
_, err := p2p.ExtractGossipDigest(topic)
|
|
if err != nil {
|
|
return
|
|
}
|
|
})
|
|
}
|