Refactoring code. Use protocol.HashData and HashSize. Move PublicKey2NodeID into protocol.

This commit is contained in:
Kleissner
2021-10-17 17:15:22 +02:00
parent 39217ab5ef
commit 7be31a9e34
9 changed files with 37 additions and 58 deletions

View File

@@ -418,7 +418,7 @@ func decodePeerRecord(data []byte, count int) (hash2Peers []Hash2Peer, read int,
return nil, 0, false
}
peer.NodeID = PublicKey2NodeID(peer.PublicKey)
peer.NodeID = protocol.PublicKey2NodeID(peer.PublicKey)
if reason == 0 { // Peer was returned because it is close to the requested hash
hash2Peer.Closest = append(hash2Peer.Closest, peer)