onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
531 stars 177 forks source link

[Observer] Ambiguous references #6344

Closed UlyanaAndrukhiv closed 1 week ago

UlyanaAndrukhiv commented 2 months ago

Problem Definition

Observer node builder has ambiguous references bootstrapNodeAddresses and 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

Proposed Solution

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.

peterargue commented 2 months ago

are those fields used anywhere besides observer_builder.go?

UlyanaAndrukhiv commented 2 months ago

Those fields used also in follower_builder.go

are those fields used anywhere besides observer_builder.go?