Skip to content

Commit

Permalink
order of fields in config matters
Browse files Browse the repository at this point in the history
  • Loading branch information
Farber98 committed Oct 30, 2024
1 parent 7475aef commit ca7f840
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/solana/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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() {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ca7f840

Please sign in to comment.