Skip to content

Commit 7c2253d

Browse files
pradt2mxinden
andauthored
protocols/kad: Populate the key field to fix go-libp2p interop (#2309)
populate the `key` field when converting `kadrequestmsg::putvalue` to `proto::message`. Co-authored-by: Max Inden <[email protected]>
1 parent 06c339c commit 7c2253d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

protocols/kad/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
`InboundPutRecordRequest` into `InboundRequest::PutRecord` and `InboundAddProviderRequest` into
77
`InboundRequest::AddProvider` (see [PR 2297]).
88

9+
- Populate the `key` field when converting `KadRequestMsg::PutValue` to `proto::Message` (see [PR 2309]).
10+
911
[PR 2245]: https://github.com/libp2p/rust-libp2p/pull/2245
1012
[PR 2297]: https://github.com/libp2p/rust-libp2p/pull/2297
13+
[PR 2309]: https://github.com/libp2p/rust-libp2p/pull/2309
1114

1215
# 0.32.0-rc.2 [2021-10-15]
1316

protocols/kad/src/protocol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ fn req_msg_to_proto(kad_msg: KadRequestMsg) -> proto::Message {
378378
},
379379
KadRequestMsg::PutValue { record } => proto::Message {
380380
r#type: proto::message::MessageType::PutValue as i32,
381+
key: record.key.to_vec(),
381382
record: Some(record_to_proto(record)),
382383
..proto::Message::default()
383384
},

0 commit comments

Comments
 (0)