erigon icon indicating copy to clipboard operation
erigon copied to clipboard

stick to go's idea of exporting structs and defining interfaces at consumers in polygon/p2p,sync,heimdall packages

Open taratorio opened this issue 1 year ago • 0 comments

we have a bunch of constructors in polygon/p2p,sync,heimdall packages that return interfaces this goes against go's idea of always returning/exporting concrete structs and defining interfaces at consumers

  • change all constructors in those new packages to return pointers to concrete structs
  • define the interfaces at the consuming components/packages as private interfaces (lowercase)
  • should not change the logic simply a stylistical change to align us better with the spirit of go

taratorio avatar Jul 04 '24 17:07 taratorio