mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
use/store switchMsg in the switch instead of going through the old switchMessage
This commit is contained in:
parent
3dab94be9f
commit
00e4da28c7
3 changed files with 76 additions and 48 deletions
|
@ -115,18 +115,6 @@ func wire_decode_coords(packet []byte) ([]byte, int) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
type switchMsg struct {
|
||||
Root sigPubKey
|
||||
TStamp int64
|
||||
Hops []switchMsgHop
|
||||
}
|
||||
|
||||
type switchMsgHop struct {
|
||||
Port switchPort
|
||||
Next sigPubKey
|
||||
Sig sigBytes
|
||||
}
|
||||
|
||||
func (m *switchMsg) encode() []byte {
|
||||
bs := wire_encode_uint64(wire_SwitchMsg)
|
||||
bs = append(bs, m.Root[:]...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue