mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-09-18 09:52:30 +00:00
move wire_encode_locator logic into getBytesForSig, since that's the only place it's used
This commit is contained in:
@@ -347,11 +347,9 @@ func (p *peer) handleSwitchMsg(packet []byte) {
|
||||
}
|
||||
|
||||
func getBytesForSig(next *sigPubKey, loc *switchLocator) []byte {
|
||||
//bs, err := wire_encode_locator(loc)
|
||||
//if err != nil { panic(err) }
|
||||
bs := append([]byte(nil), next[:]...)
|
||||
bs = append(bs, wire_encode_locator(loc)...)
|
||||
//bs := wire_encode_locator(loc)
|
||||
//bs = append(next[:], bs...)
|
||||
bs = append(bs, loc.root[:]...)
|
||||
bs = append(bs, wire_encode_uint64(wire_intToUint(loc.tstamp))...)
|
||||
bs = append(bs, wire_encode_coords(loc.getCoords())...)
|
||||
return bs
|
||||
}
|
||||
|
Reference in New Issue
Block a user