Skip to content
Snippets Groups Projects
Unverified Commit 5d5ef57c authored by capossele's avatar capossele
Browse files

:bug: Fix some bugs

parent 1d57451c
Branches
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ func FPCOpinionQueryReplyErrors() uint64 {
//// logic broken into "process..." functions to be able to write unit tests ////
func processRoundStats(stats vote.RoundStats) {
func processRoundStats(stats *vote.RoundStats) {
// get the number of active conflicts
numActive := (uint64)(len(stats.ActiveVoteContexts))
atomic.StoreUint64(&activeConflicts, numActive)
......
......@@ -32,6 +32,9 @@ var log *logger.Logger
func configure(_ *node.Plugin) {
log = logger.NewLogger(PluginName)
}
func run(_ *node.Plugin) {
//// Events declared in other packages which we want to listen to here ////
......@@ -52,7 +55,7 @@ func configure(_ *node.Plugin) {
}))
// FPC round executed
valuetransfers.Voter().Events().RoundExecuted.Attach(events.NewClosure(func(roundStats vote.RoundStats) {
valuetransfers.Voter().Events().RoundExecuted.Attach(events.NewClosure(func(roundStats *vote.RoundStats) {
processRoundStats(roundStats)
}))
......@@ -107,9 +110,7 @@ func configure(_ *node.Plugin) {
metrics.Events().QueryReplyError.Attach(events.NewClosure(func(ev *metrics.QueryReplyErrorEvent) {
processQueryReplyError(ev)
}))
}
func run(_ *node.Plugin) {
// create a background worker that "measures" the MPS value every second
if err := daemon.BackgroundWorker("Metrics Updater", func(shutdownSignal <-chan struct{}) {
timeutil.Ticker(func() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment