Wow, this isnt bad at all, now DHT makes much less queries but restarts
This commit is contained in:
parent
242f064328
commit
3b3af34152
2 changed files with 125 additions and 49 deletions
|
|
@ -292,12 +292,12 @@ pub struct FindNodeRequest {
|
|||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct Response<BufT> {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub values: Option<Vec<CompactPeerInfo>>,
|
||||
pub id: Id20,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub nodes: Option<CompactNodeInfo>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub values: Option<Vec<CompactPeerInfo>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<BufT>,
|
||||
}
|
||||
|
||||
|
|
@ -326,10 +326,10 @@ pub struct GetPeersResponse<BufT> {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct Message<BufT> {
|
||||
pub kind: MessageKind<BufT>,
|
||||
pub transaction_id: BufT,
|
||||
pub version: Option<BufT>,
|
||||
pub ip: Option<SocketAddrV4>,
|
||||
pub kind: MessageKind<BufT>,
|
||||
}
|
||||
|
||||
impl Message<ByteString> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue