Skip to content

Commit 450ca67

Browse files
lexnvTarekkMA
authored andcommitted
network: Update litep2p to v0.5.0 (paritytech#4570)
## [0.5.0] - 2023-05-24 This is a small patch release that makes the `FindNode` command a bit more robst: - The `FindNode` command now retains the K (replication factor) best results. - The `FindNode` command has been updated to handle errors and unexpected states without panicking. ### Changed - kad: Refactor FindNode query, keep K best results and add tests ([paritytech#114](paritytech/litep2p#114)) --------- Signed-off-by: Alexandru Vasile <[email protected]>
1 parent 69b03bb commit 450ca67

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

substrate/client/network/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ sp-blockchain = { path = "../../primitives/blockchain" }
5959
sp-core = { path = "../../primitives/core" }
6060
sp-runtime = { path = "../../primitives/runtime" }
6161
wasm-timer = "0.2"
62-
litep2p = "0.4.0"
62+
litep2p = "0.5.0"
6363
once_cell = "1.18.0"
6464
void = "1.0.2"
6565
schnellru = "0.2.1"

substrate/client/network/src/litep2p/discovery.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,7 @@ impl Stream for Discovery {
466466
"`GET_RECORD` succeeded for {query_id:?}: {records:?}",
467467
);
468468

469-
return Poll::Ready(Some(DiscoveryEvent::GetRecordSuccess {
470-
query_id,
471-
record: record.record,
472-
}));
469+
return Poll::Ready(Some(DiscoveryEvent::GetRecordSuccess { query_id, records }));
473470
},
474471
Poll::Ready(Some(KademliaEvent::PutRecordSucess { query_id, key: _ })) =>
475472
return Poll::Ready(Some(DiscoveryEvent::PutRecordSuccess { query_id })),

substrate/client/network/types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ documentation = "https://docs.rs/sc-network-types"
1313
bs58 = "0.5.0"
1414
ed25519-dalek = "2.1"
1515
libp2p-identity = { version = "0.1.3", features = ["ed25519", "peerid"] }
16-
litep2p = "0.4.0"
16+
litep2p = "0.5.0"
1717
multiaddr = "0.17.0"
1818
multihash = { version = "0.17.0", default-features = false, features = ["identity", "multihash-impl", "sha2", "std"] }
1919
rand = "0.8.5"

0 commit comments

Comments
 (0)