Actually set the wantlist

This commit is contained in:
Rüdiger Klaehn 2020-02-10 18:15:25 +01:00
parent 74b289df55
commit 5ca8137b4c

View File

@ -171,6 +171,9 @@ impl Into<Vec<u8>> for &Message<O> {
payload.data = block.data().to_vec();
proto.payload.push(payload);
}
if !wantlist.entries.is_empty() {
proto.wantlist = Some(wantlist);
}
let mut res = Vec::with_capacity(proto.encoded_len());
proto
.encode(&mut res)