Closed UlyanaAndrukhiv closed 1 week ago
Observer node builder has ambiguous references bootstrapNodeAddresses and bootstrapNodePublicKeys.
bootstrapNodeAddresses
bootstrapNodePublicKeys
First from ObserverServiceConfig https://github.com/onflow/flow-go/blob/31007f01a782d78cc7be55ffeb69c90bb0d8bcc6/cmd/observer/node_builder/observer_builder.go#L138-L140 and another from FlowNodeBuilder https://github.com/onflow/flow-go/blob/31007f01a782d78cc7be55ffeb69c90bb0d8bcc6/cmd/scaffold.go#L141-L142
ObserverServiceConfig
FlowNodeBuilder
Since ObserverServiceBuilder embeds FlowNodeBuilder, it will inherit the bootstrapNodeAddresses and bootstrapNodePublicKeys fields from FlowNodeBuilder. This means can directly access these fields via ObserverServiceBuilder, avoiding duplication.
ObserverServiceBuilder
are those fields used anywhere besides observer_builder.go?
observer_builder.go
Those fields used also in follower_builder.go
follower_builder.go
Problem Definition
Observer node builder has ambiguous references
bootstrapNodeAddresses
andbootstrapNodePublicKeys
.First from
ObserverServiceConfig
https://github.com/onflow/flow-go/blob/31007f01a782d78cc7be55ffeb69c90bb0d8bcc6/cmd/observer/node_builder/observer_builder.go#L138-L140 and another fromFlowNodeBuilder
https://github.com/onflow/flow-go/blob/31007f01a782d78cc7be55ffeb69c90bb0d8bcc6/cmd/scaffold.go#L141-L142Proposed Solution
Since
ObserverServiceBuilder
embedsFlowNodeBuilder
, it will inherit thebootstrapNodeAddresses
andbootstrapNodePublicKeys
fields fromFlowNodeBuilder
. This means can directly access these fields viaObserverServiceBuilder
, avoiding duplication.