-
Notifications
You must be signed in to change notification settings - Fork 15
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
chore: update example #291
Conversation
import PeerId from "peer-id"; | ||
|
||
const myPeerId: PeerId = ...; | ||
|
||
const bootstrapEnrs: ENR[] = [...]; | ||
const bootEnrs: ENR[] = [...]; |
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.
can you add an import for this type?
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.
we have a general issue with our readme examples also in the Lodestar repo, might wanna spend some time investigating ChainSafe/lodestar#6300. This would ensure the examples are runnable and detect issues due to code refactoring / dependency updates.
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.
@wemeetagain done!
import { Discv5Discovery, ENR } from "@chainsafe/discv5"; | ||
import Libp2p from "libp2p"; | ||
import {Discv5Discovery} from "@chainsafe/discv5"; | ||
import {ENR, SignableENR} from "@chainsafe/enr"; |
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.
do we have to import these from enr package or does discv5 re-export? the later seems better devex to me
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.
I haven't seen them being re-exported. Maybe @wemeetagain knows better?
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.
I don't like that we import stuff from enr package, other than that seems fine to me
Two follow-ups to this PR
Also @wemeetagain should probably give this a final ✔️ |
Make sure the
libp2p
integration example reflects the latest libp2p version.