Skip to content

Commit

Permalink
Fix server side beacon blocks by range (#4046)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon authored Nov 19, 2019
1 parent 64b69d9 commit 3f6435a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beacon-chain/sync/rpc_beacon_blocks_by_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (r *RegularSync) beaconBlocksByRangeRPCHandler(ctx context.Context, msg int
m := msg.(*pb.BeaconBlocksByRangeRequest)

startSlot := m.StartSlot
endSlot := startSlot + (m.Step * m.Count)
endSlot := startSlot + (m.Step * (m.Count-1))

span.AddAttributes(
trace.Int64Attribute("start", int64(startSlot)),
Expand Down
4 changes: 2 additions & 2 deletions beacon-chain/sync/rpc_beacon_blocks_by_range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func TestBeaconBlocksRPCHandler_ReturnsBlocks(t *testing.T) {

req := &pb.BeaconBlocksByRangeRequest{
StartSlot: 100,
Step: 4,
Count: 100,
Step: 64,
Count: 16,
}

// Populate the database with blocks that would match the request.
Expand Down

0 comments on commit 3f6435a

Please sign in to comment.