Skip to content

Commit 0b639ac

Browse files
Optimization: get data via one request (#117)
1 parent bb33071 commit 0b639ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/indexer/receiver/sync_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ func (s *ModuleTestSuite) TestModule_SyncReadsBlocks() {
8383

8484
for i := types.Level(1); i <= blockCount; i++ {
8585
s.api.EXPECT().
86-
// BlockData(gomock.Any(), i).
87-
BlockDataGet(gomock.Any(), i).
86+
BlockData(gomock.Any(), i).
87+
// BlockDataGet(gomock.Any(), i).
8888
Return(types.BlockData{
8989
ResultBlock: getResultBlock(i),
9090
ResultBlockResults: getResultBlockResults(i),

pkg/indexer/receiver/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (r *Module) worker(ctx context.Context, level types.Level) {
2525
}
2626

2727
requestTimeout, cancel := context.WithTimeout(ctx, time.Minute)
28-
block, err := r.api.BlockDataGet(requestTimeout, level)
28+
block, err := r.api.BlockData(requestTimeout, level)
2929
if err != nil {
3030
cancel()
3131

0 commit comments

Comments
 (0)