Start refactoring protocol code into sub package. Move Packet Encoding and list of Commands. Change SetSelfReportedPorts parameters.

More related commits to follow!
This commit is contained in:
Kleissner
2021-10-17 16:28:19 +02:00
parent 2476146949
commit 0c7b1e0e03
18 changed files with 149 additions and 115 deletions

View File

@@ -11,6 +11,7 @@ import (
"fmt"
"github.com/PeernetOfficial/core/dht"
"github.com/PeernetOfficial/core/protocol"
)
// respondClosesContactsCount is the number of closest contact to respond.
@@ -198,7 +199,7 @@ func (peer *PeerInfo) cmdPing(msg *MessageRaw) {
return
}
raw := &PacketRaw{Command: CommandPong, Sequence: msg.Sequence}
raw := &protocol.PacketRaw{Command: protocol.CommandPong, Sequence: msg.Sequence}
Filters.MessageOutPong(peer, raw)