Commit 1630ad33 authored by Andreas Bigger's avatar Andreas Bigger

feat: config

parent d92d1c00
......@@ -74,6 +74,11 @@ func validatePort(p uint) (uint16, error) {
return uint16(p), nil
}
func loadScoringOpts(conf *p2p.Config, ctx *cli.Context) error {
conf.ScoringParams = p2p.DefaultScoringParams
return nil
}
func loadListenOpts(conf *p2p.Config, ctx *cli.Context) error {
listenIP := ctx.GlobalString(flags.ListenIP.Name)
if listenIP != "" { // optional
......
......@@ -49,6 +49,9 @@ type Config struct {
DisableP2P bool
NoDiscovery bool
// P2P Scoring Configurations
ScoringConfig *ScoringConfig
ListenIP net.IP
ListenTCPPort uint16
......@@ -95,6 +98,11 @@ type Config struct {
ConnMngr func(conf *Config) (connmgr.ConnManager, error)
}
type ScoringConfig struct {
// Scoring Level
EnablePeerScoring bool
}
type ConnectionGater interface {
connmgr.ConnectionGater
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment