Copy all values obtained from the slashing protection database as they are returned. This avoids a potential overwrite situation when bulk fetching information, most notably when data is obtained for generating a slashing protection export.
This fixes an issue where --export-slashing-protection would sometimes provide erroneous information.
This change also explicitly closes the slashing protection database on exit, and holds the main goroutine open for a couple of seconds to ensure the close completes before shutting down Dirk. A log message is provided stating that the close succeeded (or not).
Copy all values obtained from the slashing protection database as they are returned. This avoids a potential overwrite situation when bulk fetching information, most notably when data is obtained for generating a slashing protection export.
This fixes an issue where --export-slashing-protection would sometimes provide erroneous information.
This change also explicitly closes the slashing protection database on exit, and holds the main goroutine open for a couple of seconds to ensure the close completes before shutting down Dirk. A log message is provided stating that the close succeeded (or not).