New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename getter functions to be idiomatic #8320
Changes from 3 commits
0aa080e
1dce2ec
a9af343
5be3215
39fb9ef
d61afdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ type Service struct { | |
} | ||
|
||
// NewService initializes a new p2p service compatible with shared.Service interface. No | ||
// connections are made until the Start function is called during the service registry startup. | ||
// connections are made until the New function is called during the service registry startup. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure this change is correct? |
||
func NewService(ctx context.Context, cfg *Config) (*Service, error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. But let's do it in another PR |
||
var err error | ||
ctx, cancel := context.WithCancel(ctx) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ func (bs *Server) ListAttestations( | |
} | ||
|
||
// ListIndexedAttestations retrieves indexed attestations by block root. | ||
// IndexedAttestationsForEpoch are sorted by data slot by default. Start-end epoch | ||
// IndexedAttestationsForEpoch are sorted by data slot by default. New-end epoch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something is not right here. |
||
// filter is used to retrieve blocks with. | ||
// | ||
// The server may return an empty list when no attestations match the given | ||
|
@@ -334,7 +334,7 @@ func (bs *Server) StreamIndexedAttestations( | |
func (bs *Server) collectReceivedAttestations(ctx context.Context) { | ||
attsByRoot := make(map[[32]byte][]*ethpb.Attestation) | ||
twoThirdsASlot := 2 * slotutil.DivideSlotBy(3) /* 2/3 slot duration */ | ||
ticker := slotutil.GetSlotTickerWithOffset(bs.GenesisTimeFetcher.GenesisTime(), twoThirdsASlot, params.BeaconConfig().SecondsPerSlot) | ||
ticker := slotutil.NewWithOffset(bs.GenesisTimeFetcher.GenesisTime(), twoThirdsASlot, params.BeaconConfig().SecondsPerSlot) | ||
for { | ||
select { | ||
case <-ticker.C(): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.