Skip to content

Implement Pagination for Mempool Indexer#657

Open
AkarshSahlot wants to merge 1 commit intoblock-core:mainfrom
AkarshSahlot:feature/mempool-pagination
Open

Implement Pagination for Mempool Indexer#657
AkarshSahlot wants to merge 1 commit intoblock-core:mainfrom
AkarshSahlot:feature/mempool-pagination

Conversation

@AkarshSahlot
Copy link

Closes #654


allTransactions.AddRange(trx.Select(t => MapToQueryTransaction(t)));

if (trx.Count < 50)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No safety guard against infinite loops.
Make this happen max 10 times

if (!response.IsSuccessStatusCode)
throw new InvalidOperationException(response.ReasonPhrase);

var trx = await response.Content.ReadFromJsonAsync<List<MempoolTransaction>>(new JsonSerializerOptions()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsonSerializerOptions re-allocated every iteration. It should be a static readonly

@dangershony
Copy link
Member

delete the md files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Pagination for Mempool Indexer Service Description

2 participants