From 0c8a1e34c51bf020e9a4216ee39363afac855fa0 Mon Sep 17 00:00:00 2001 From: pradt2 <12902844+pradt2@users.noreply.github.com> Date: Sun, 24 Oct 2021 22:11:53 +0100 Subject: [PATCH 1/2] Populate the key field. This fixes go-libp2p interop --- protocols/kad/src/protocol.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/protocols/kad/src/protocol.rs b/protocols/kad/src/protocol.rs index 0f883649b05..db3c99067e1 100644 --- a/protocols/kad/src/protocol.rs +++ b/protocols/kad/src/protocol.rs @@ -378,6 +378,7 @@ fn req_msg_to_proto(kad_msg: KadRequestMsg) -> proto::Message { }, KadRequestMsg::PutValue { record } => proto::Message { r#type: proto::message::MessageType::PutValue as i32, + key: record.key.to_vec(), record: Some(record_to_proto(record)), ..proto::Message::default() }, From c1cb8fbea775bbc347da4c671851a2b80f8f6fe4 Mon Sep 17 00:00:00 2001 From: pradt2 <12902844+pradt2@users.noreply.github.com> Date: Sat, 30 Oct 2021 15:07:14 +0100 Subject: [PATCH 2/2] Add CHANGELOG.md entry --- protocols/kad/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index 660f4246b6a..33bda7b8810 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -6,8 +6,11 @@ `InboundPutRecordRequest` into `InboundRequest::PutRecord` and `InboundAddProviderRequest` into `InboundRequest::AddProvider` (see [PR 2297]). +- Populate the `key` field when converting `KadRequestMsg::PutValue` to `proto::Message` (see [PR 2309]). + [PR 2245]: https://github.com/libp2p/rust-libp2p/pull/2245 [PR 2297]: https://github.com/libp2p/rust-libp2p/pull/2297 +[PR 2309]: https://github.com/libp2p/rust-libp2p/pull/2309 # 0.32.0-rc.2 [2021-10-15]