Skip to content

Conversation

@NamsooCho
Copy link
Member

@NamsooCho NamsooCho commented Feb 2, 2018

Refactor dht_node.rs.

Revise codes according to changes of packet.rs
Introduce PrecomputedKey HashMap
Move Option to Result if available

@coveralls
Copy link

coveralls commented Feb 2, 2018

Pull Request Test Coverage Report for Build 53

  • 759 of 903 (84.05%) changed or added relevant lines in 6 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.4%) to 95.609%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/toxcore/dht_new/packet_kind.rs 7 8 87.5%
src/toxcore/dht_new/packet.rs 105 111 94.59%
src/toxcore/dht_new/codec.rs 34 49 69.39%
src/toxcore/dht_new/dht_impl.rs 121 181 66.85%
src/toxcore/dht_new/dht_node.rs 457 519 88.05%
Files with Coverage Reduction New Missed Lines %
src/toxcore/dht_new/kbucket.rs 1 98.33%
src/toxcore/state_format/old.rs 1 98.46%
Totals Coverage Status
Change from base Build 51: -1.4%
Covered Lines: 6510
Relevant Lines: 6809

💛 - Coveralls

[`.kind()`](./struct.DhtPacket.html#method.kind) method.
Returns `None` in case of faliure:
Returns `Error` in case of faliure:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

faliure -> failure

format!("DhtPacket decrypt error: {:?}", e))
});

match self.packet_kind {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose switch to DhtPacketPayload::from_bytes when #11 is merged - it will reduce code size.

@kpp
Copy link
Member

kpp commented Feb 27, 2018

This PR is closed in favor of #25

@kpp kpp closed this Feb 27, 2018
kurnevsky pushed a commit that referenced this pull request Sep 4, 2022
Save DHT keys to a binary file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants