Skip to content

Conversation

@wolf31o2
Copy link
Member

@wolf31o2 wolf31o2 commented Apr 3, 2025

No description provided.

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@wolf31o2 wolf31o2 requested a review from a team as a code owner April 3, 2025 18:02
shouldBlock := false
// We chose 500 as an arbitrary max batch size. A "chain extended" message will be logged after each batch
nextBatch := make([]*chain.ChainIteratorResult, 0, 500)
var next, nextRollback *chain.ChainIteratorResult
Copy link
Contributor

Choose a reason for hiding this comment

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

next is used with append() in the loop, but I think this won't actually be a problem. We should be storing a copy of the pointer value in the list, which won't change when the original pointer changes.

@wolf31o2 wolf31o2 merged commit 17353e4 into main Apr 3, 2025
10 checks passed
@wolf31o2 wolf31o2 deleted the fix/state-reduce-allocations branch April 3, 2025 23:12
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.

3 participants