use/store switchMsg in the switch instead of going through the old switchMessage

This commit is contained in:
Arceliar 2018-06-07 13:56:11 -05:00
parent 3dab94be9f
commit 00e4da28c7
3 changed files with 76 additions and 48 deletions

View file

@ -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[:]...)