forked from cerc-io/plugeth
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.
This commit is contained in:
parent
1201e7c4f8
commit
9f28e94d66
@ -39,7 +39,7 @@ func PluginCommitUpdate(pl *plugins.PluginLoader, num uint64) {
|
|||||||
if freezerUpdates == nil { freezerUpdates = make(map[uint64]map[string]interface{}) }
|
if freezerUpdates == nil { freezerUpdates = make(map[uint64]map[string]interface{}) }
|
||||||
min := ^uint64(0)
|
min := ^uint64(0)
|
||||||
for i := range freezerUpdates{
|
for i := range freezerUpdates{
|
||||||
if min < i { min = i }
|
if min > i { min = i }
|
||||||
}
|
}
|
||||||
for i := min ; i < num; i++ {
|
for i := min ; i < num; i++ {
|
||||||
update, ok := freezerUpdates[i]
|
update, ok := freezerUpdates[i]
|
||||||
|
Loading…
Reference in New Issue
Block a user