-
Notifications
You must be signed in to change notification settings - Fork 90
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
app/peerinfo: implement protocol skeleton #1225
Conversation
Codecov ReportBase: 53.20% // Head: 53.13% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1225 +/- ##
==========================================
- Coverage 53.20% 53.13% -0.07%
==========================================
Files 136 136
Lines 15958 15958
==========================================
- Hits 8490 8479 -11
- Misses 6227 6234 +7
- Partials 1241 1245 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
type ( | ||
tickerProvider func() (<-chan time.Time, func()) | ||
nowFunc func() time.Time | ||
) |
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.
why these types?
for tests?
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.
yup
tickerProvider, nowFunc) | ||
} | ||
|
||
func newInternal(tcpNode host.Host, peers []peer.ID, version string, lockHash []byte, |
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.
new internal what?
this function name seems vague
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.
also add godoc
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.
New
and NewForT
both call newInternal
since it is the new
function used internally
This adds the skeleton for the new
peerinfo
protocol. It is aimed at sharing peer information/metadata.The supported use-cases are:
Tests will be added in a separate PR.
category: feature
ticket: #1224