From ca7f84047632d2ac18391bba7789cca298940a55 Mon Sep 17 00:00:00 2001 From: Farber98 Date: Wed, 30 Oct 2024 14:03:33 -0300 Subject: [PATCH] order of fields in config matters --- pkg/solana/config/config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/solana/config/config.go b/pkg/solana/config/config.go index 4e6ba65c1..da8ff7f99 100644 --- a/pkg/solana/config/config.go +++ b/pkg/solana/config/config.go @@ -54,9 +54,9 @@ type Config interface { ComputeUnitPriceDefault() uint64 FeeBumpPeriod() time.Duration BlockHistoryPollPeriod() time.Duration - BlockHistorySize() uint64 ComputeUnitLimitDefault() uint32 EstimateComputeUnitLimit() bool + BlockHistorySize() uint64 } type Chain struct { @@ -76,9 +76,9 @@ type Chain struct { ComputeUnitPriceDefault *uint64 FeeBumpPeriod *config.Duration BlockHistoryPollPeriod *config.Duration - BlockHistorySize *uint64 ComputeUnitLimitDefault *uint32 EstimateComputeUnitLimit *bool + BlockHistorySize *uint64 } func (c *Chain) SetDefaults() { @@ -130,15 +130,15 @@ func (c *Chain) SetDefaults() { if c.BlockHistoryPollPeriod == nil { c.BlockHistoryPollPeriod = defaultConfigSet.BlockHistoryPollPeriod } - if c.BlockHistorySize == nil { - c.BlockHistorySize = defaultConfigSet.BlockHistorySize - } if c.ComputeUnitLimitDefault == nil { c.ComputeUnitLimitDefault = defaultConfigSet.ComputeUnitLimitDefault } if c.EstimateComputeUnitLimit == nil { c.EstimateComputeUnitLimit = defaultConfigSet.EstimateComputeUnitLimit } + if c.BlockHistorySize == nil { + c.BlockHistorySize = defaultConfigSet.BlockHistorySize + } } type Node struct {