Skip to content

Commit

Permalink
Remove GenesisAllocs print that spams the logs on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Feb 6, 2025
1 parent afeda4f commit c595fd8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions quai/quaiconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
package quaiconfig

import (
"fmt"
"math/big"
"reflect"
"strings"
"time"

"github.com/dominant-strategies/go-quai/cmd/genallocs"
Expand Down Expand Up @@ -217,3 +220,16 @@ func CreateBlake3ConsensusEngine(stack *node.Node, nodeLocation common.Location,
engine.SetThreads(-1) // Disable CPU mining
return engine
}

func (c Config) String() string {
var fields []string
v := reflect.ValueOf(c)
t := reflect.TypeOf(c)
for i := 0; i < t.NumField(); i++ {
if t.Field(i).Name == "GenesisAllocs" {
continue
}
fields = append(fields, fmt.Sprintf("%s: %v", t.Field(i).Name, v.Field(i).Interface()))
}
return fmt.Sprintf("Config{%s}", strings.Join(fields, ", "))
}

0 comments on commit c595fd8

Please sign in to comment.