From 12cc9fc79c4b243893ba935e80cc7c33a6423e9d Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 24 Sep 2024 20:42:42 -0500 Subject: [PATCH] =?UTF-8?q?Make=20all=20the=20fork/filter=20heights=20poin?= =?UTF-8?q?ters=20so=20that=20they=20serialize=20to=20y=E2=80=A6=20(#164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/config/config.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 2b63992..38fd310 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -105,12 +105,13 @@ type NetworkConstants struct { MinPlotSize uint8 `yaml:"MIN_PLOT_SIZE,omitempty" json:"MIN_PLOT_SIZE,omitempty"` NetworkType uint8 `yaml:"NETWORK_TYPE,omitempty" json:"NETWORK_TYPE,omitempty"` SubSlotItersStarting uint64 `yaml:"SUB_SLOT_ITERS_STARTING,omitempty" json:"SUB_SLOT_ITERS_STARTING,omitempty"` - HardForkHeight uint32 `yaml:"HARD_FORK_HEIGHT,omitempty" json:"HARD_FORK_HEIGHT,omitempty"` - SoftFork4Height uint32 `yaml:"SOFT_FORK4_HEIGHT,omitempty" json:"SOFT_FORK4_HEIGHT,omitempty"` - SoftFork5Height uint32 `yaml:"SOFT_FORK5_HEIGHT,omitempty" json:"SOFT_FORK5_HEIGHT,omitempty"` - PlotFilter128Height uint32 `yaml:"PLOT_FILTER_128_HEIGHT,omitempty" json:"PLOT_FILTER_128_HEIGHT,omitempty"` - PlotFilter64Height uint32 `yaml:"PLOT_FILTER_64_HEIGHT,omitempty" json:"PLOT_FILTER_64_HEIGHT,omitempty"` - PlotFilter32Height uint32 `yaml:"PLOT_FILTER_32_HEIGHT,omitempty" json:"PLOT_FILTER_32_HEIGHT,omitempty"` + // All pointers that that 0 is an allowed value when marshaling with omitempty, but they will still be omitted from configs that dont have them defined + HardForkHeight *uint32 `yaml:"HARD_FORK_HEIGHT,omitempty" json:"HARD_FORK_HEIGHT,omitempty"` + SoftFork4Height *uint32 `yaml:"SOFT_FORK4_HEIGHT,omitempty" json:"SOFT_FORK4_HEIGHT,omitempty"` + SoftFork5Height *uint32 `yaml:"SOFT_FORK5_HEIGHT,omitempty" json:"SOFT_FORK5_HEIGHT,omitempty"` + PlotFilter128Height *uint32 `yaml:"PLOT_FILTER_128_HEIGHT,omitempty" json:"PLOT_FILTER_128_HEIGHT,omitempty"` + PlotFilter64Height *uint32 `yaml:"PLOT_FILTER_64_HEIGHT,omitempty" json:"PLOT_FILTER_64_HEIGHT,omitempty"` + PlotFilter32Height *uint32 `yaml:"PLOT_FILTER_32_HEIGHT,omitempty" json:"PLOT_FILTER_32_HEIGHT,omitempty"` } // NetworkConfig specific network configuration settings