-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: enable PX #363
base: main
Are you sure you want to change the base?
feat: enable PX #363
Conversation
f7d915a
to
4c5dadc
Compare
@@ -216,6 +216,13 @@ async function main() { | |||
render(); | |||
}); | |||
|
|||
setInterval(() => { | |||
peers = node.networkNode.getAllPeers(); | |||
discoveryPeers = node.networkNode.getGroupPeers("drp::discovery"); |
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.
let's drop the listing of discoveryPeers on the examples (all)
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.
are you sure ?
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 not? is it useful information?
IPColocationFactorWeight: 0, | ||
appSpecificScore: (peerId: string) => { | ||
if (_bootstrapPeerID.includes(peerId)) { |
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 are we creating a new variable and populating it instead of directly checking _bootstrapNodesList
?
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.
There the list is only the list of the peer id in the BT list not the full MA.
This is made in order not to recompute the same variable over and over
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.
if (_bootstrapPeerID.includes(peerId)) { | |
if (_bootstrapNodesList.some((addr) => addr.includes(peerId))) { |
how pre-populating is better than this? you don't recompute, it's only computed when you do the initialization (no?)
}, | ||
}), | ||
scoreThresholds: createPeerScoreThresholds({ | ||
gossipThreshold: -50, |
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.
comment inline why
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
9102b3a
to
537c455
Compare
Signed-off-by: Sacha Froment <sfroment42@gmail.com>
Signed-off-by: Sacha Froment sfroment42@gmail.com