aquatic http protocol: allow non-existing peers in Response

Really, this is to allow missing peers6
This commit is contained in:
Joakim Frostegård 2020-08-02 10:03:42 +02:00
parent fe887e1de5
commit a18596544f

View file

@ -15,7 +15,7 @@ pub struct ResponsePeer<I: Eq>{
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(transparent)]
pub struct ResponsePeerListV4(
#[serde(
@ -26,7 +26,7 @@ pub struct ResponsePeerListV4(
);
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(transparent)]
pub struct ResponsePeerListV6(
#[serde(
@ -51,7 +51,9 @@ pub struct AnnounceResponse {
pub announce_interval: usize,
pub complete: usize,
pub incomplete: usize,
#[serde(default)]
pub peers: ResponsePeerListV4,
#[serde(default)]
pub peers6: ResponsePeerListV6,
}