mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
f3d6dbcc1e
* config params into pkg * gaz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
28 lines
606 B
Go
28 lines
606 B
Go
package fuzz
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/encoder"
|
|
"github.com/prysmaticlabs/prysm/config/params"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
)
|
|
|
|
var buf = new(bytes.Buffer)
|
|
|
|
// SszEncoderAttestationFuzz runs network encode/decode for attestations.
|
|
func SszEncoderAttestationFuzz(b []byte) {
|
|
params.UseMainnetConfig()
|
|
buf.Reset()
|
|
input := ðpb.Attestation{}
|
|
e := encoder.SszNetworkEncoder{}
|
|
if err := e.DecodeGossip(b, input); err != nil {
|
|
_ = err
|
|
return
|
|
}
|
|
if _, err := e.EncodeGossip(buf, input); err != nil {
|
|
_ = err
|
|
return
|
|
}
|
|
}
|