Commit Graph

9 Commits

Author SHA1 Message Date
philip-morlier
967626b075 Updates to reflect comments on original merge. 2022-08-22 11:48:26 -07:00
philip-morlier
59a823409e Merge tag 'v1.10.22' into feature/merge-v1.10.22 2022-08-22 10:48:40 -07:00
Austin Roberts
627f95403f Pass loop variable to defer function
The loop variable changes before the defer executes, so we need to
pass it to the function to make sure the closure has the correct
version of the loop variable.
2022-01-07 13:58:39 -06:00
Austin Roberts
9f28e94d66 Fix memory leak in freezer implementation
It turns out we were only notifying plugins of freezer commits and
cleaning up our record when the block being processed was greater
than MAX_UINT64.

So, uh, never.
2022-01-07 11:36:30 -06:00
Austin Roberts
80ae5b46d4 Fix tracking of ancients
We had been assuming that the `item` returned from batch.commit()
was the item committed, but it's actually the next item to be added
to the freezer, and multiple items can be committed in a single batch.

This commit finds the smallest item in the freezer and iterates from
that to the number returned by commit(), passing any tracked blocks
in that range to plugins.
2021-10-28 20:41:32 -05:00
Austin Roberts
34aa5df84d Use locks to prevent concurrent map accesses 2021-10-18 17:06:16 -05:00
Austin Roberts
81f2c2023a Initialize freezerUpdates variable 2021-10-18 15:10:13 -05:00
Austin Roberts
149b5220ad Update plugin hooks to support AppendAncient changes
This commit adds a ModifyAncients hook that plugins can implement
to more accurately track what Geth is doing under the hood. We
still support the old AppendAncients interface as best we can,
though internal changes may make it so that it does not behave
as it once did.
2021-10-18 12:35:56 -05:00
Austin Roberts
75ad936fbb Hooks for appending ancients, initial work on block update plugin 2021-07-14 08:33:17 -05:00