Skip to content

Commit

Permalink
add testcase for blinded proposal on router
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranmcveigh5 committed Jul 25, 2022
1 parent 6794493 commit 8072e9d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/validatorapi/router_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,26 @@ func TestRouter(t *testing.T) {
testRouter(t, handler, callback)
})

t.Run("submit_randao_blinded_block", func(t *testing.T) {
handler := testHandler{
BlindedBeaconBlockProposalFunc: func(ctx context.Context, slot eth2p0.Slot, randaoReveal eth2p0.BLSSignature, graffiti []byte) (*eth2api.VersionedBlindedBeaconBlock, error) {
return nil, errors.New("not implemented")
},
}

callback := func(ctx context.Context, cl *eth2http.Service) {
slot := eth2p0.Slot(1)
randaoReveal := testutil.RandomEth2Signature()
graffiti := testutil.RandomBytes32()

res, err := cl.BlindedBeaconBlockProposal(ctx, slot, randaoReveal, graffiti)
require.Error(t, err)
require.Nil(t, res)
}

testRouter(t, handler, callback)
})

t.Run("submit_block_phase0", func(t *testing.T) {
block1 := &spec.VersionedSignedBeaconBlock{
Version: spec.DataVersionPhase0,
Expand Down

0 comments on commit 8072e9d

Please sign in to comment.