iotaledger / hive.go

A Go library containing data structures, various utils and abstractions which are used by both GoShimmer and Hornet.
Apache License 2.0
61 stars 24 forks source link

Feat: Runtime inspection framework #649

Closed hmoog closed 8 months ago

hmoog commented 8 months ago

This PR introduces a debug framework, that allows us to "recursively inspect" objects where inspect just means to list all reachable objects and their relations.

We used these tools to find the memleak and other eviction related issues in our logic and thought that it might make sense to clean the API a bit and make it available as a general tool.

The best example for the use of this framework is https://github.com/iotaledger/iota-core/pull/787, which makes the protocol inspectable.