Skip to content

Commit

Permalink
fixup! BlobSidecarsByRange rpc handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kasey committed Jun 14, 2023
1 parent f97a668 commit 258c49d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion beacon-chain/sync/rpc_blob_sidecars_by_range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ func (c *blobsTestCase) runTestBlobSidecarsByRange(t *testing.T) {
}

func TestBlobByRangeOK(t *testing.T) {
origNC := params.BeaconNetworkConfig()
// restore network config after test completes
defer func() {
params.OverrideBeaconNetworkConfig(origNC)
}()
// set MaxRequestBlobSidecars to a low-ish value so the test doesn't timeout.
nc := params.BeaconNetworkConfig().Copy()
nc.MaxRequestBlobSidecars = 100
params.OverrideBeaconNetworkConfig(nc)

cases := []*blobsTestCase{
{
name: "beginning of window + 10",
Expand Down Expand Up @@ -126,7 +136,6 @@ func TestBlobByRangeOK(t *testing.T) {
},
total: func() *int { x := fieldparams.MaxBlobsPerBlock * 10; return &x }(), // 10 blocks * 4 blobs = 40
},

{
name: "when request count > MAX_REQUEST_BLOCKS_DENEB, MAX_REQUEST_BLOBS_SIDECARS sidecars in response",
nblocks: int(params.BeaconNetworkConfig().MaxRequestBlocksDeneb) + 10,
Expand Down

0 comments on commit 258c49d

Please sign in to comment.