Coverage Report

Created: 2024-05-16 12:16

/__w/smoldot/smoldot/repo/lib/src/network/kademlia.rs
Line
Count
Source (jump to first uncovered line)
1
// Smoldot
2
// Copyright (C) 2019-2022  Parity Technologies (UK) Ltd.
3
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
4
5
// This program is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
// GNU General Public License for more details.
14
15
// You should have received a copy of the GNU General Public License
16
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
// TODO: work in progress
19
20
pub mod kbuckets;
21
22
/// Data structure containing the k-buckets and the state of the current Kademlia queries.
23
// TODO: unused
24
pub struct Kademlia {}
25
26
impl Kademlia {
27
    /// Initializes a new empty data structure with empty k-buckets.
28
0
    pub fn new() -> Self {
29
0
        Kademlia {}
30
0
    }
Unexecuted instantiation: _RNvMNtNtCsN16ciHI6Qf_7smoldot7network8kademliaNtB2_8Kademlia3new
Unexecuted instantiation: _RNvMNtNtCseuYC0Zibziv_7smoldot7network8kademliaNtB2_8Kademlia3new
31
}
32
33
impl Default for Kademlia {
34
0
    fn default() -> Self {
35
0
        Self::new()
36
0
    }
Unexecuted instantiation: _RNvXs_NtNtCsN16ciHI6Qf_7smoldot7network8kademliaNtB4_8KademliaNtNtCsaYZPK01V26L_4core7default7Default7default
Unexecuted instantiation: _RNvXs_NtNtCseuYC0Zibziv_7smoldot7network8kademliaNtB4_8KademliaNtNtCsaYZPK01V26L_4core7default7Default7default
37
}