Skip to content
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

docs: migration guide -> missing import #2380

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/migrations/v0.46-v1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ As of `libp2p@1.0.0` the keychain is no longer part of the default bundle so to
import { keychain, type KeychainInit } from '@libp2p/keychain'
import { defaultLogger } from '@libp2p/logger'
import { LevelDatastore } from 'datastore-level'
import { Key } from 'interface-datastore/key'
import { createLibp2p } from 'libp2p'

// the datastore should come from your config
Expand All @@ -402,7 +403,7 @@ if (await datastore.has(selfKey)) {
}

const node = await createLibp2p({
peerId,
peerId
// ... other options
})
Comment on lines 405 to 408
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these fixes come from pasting this code into a new file in an aegir project (helia) and fixing saving causing auto-fix. can revert if desired.


Expand All @@ -425,4 +426,4 @@ The observed behavior of dialing peers has been that given a list of supported a

Consequently the previous dial behaviour of dialing all available addresses (up to a concurrency limit) and cancelling any in-flight dials when the first succeeds was a very inefficient use of resources.

Since `libp2p@0.46.10` we have only dialed one address at a time for each peer by setting the default value of the `ConnectionManager`'s `maxParallelDialsPerPeer` option to `1`. As of `libp2p@1.0.0` this option has been removed.
Since `libp2p@0.46.10` we have only dialed one address at a time for each peer by setting the default value of the `ConnectionManager`'s `maxParallelDialsPerPeer` option to `1`. As of `libp2p@1.0.0` this option has been removed.
Loading