mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
all: replace tailcfg.DiscoKey with key.DiscoPublic.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
f771327f0c
commit
0532eb30db
@@ -22,13 +22,16 @@ func testNodeKey(b byte) (ret key.NodePublic) {
|
||||
return key.NodePublicFromRaw32(mem.B(bs[:]))
|
||||
}
|
||||
|
||||
func testDiscoKey(hexPrefix string) (ret tailcfg.DiscoKey) {
|
||||
func testDiscoKey(hexPrefix string) (ret key.DiscoPublic) {
|
||||
b, err := hex.DecodeString(hexPrefix)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
copy(ret[:], b)
|
||||
return
|
||||
// this function is used with short hexes, so zero-extend the raw
|
||||
// value.
|
||||
var bs [32]byte
|
||||
copy(bs[:], b)
|
||||
return key.DiscoPublicFromRaw32(mem.B(bs[:]))
|
||||
}
|
||||
|
||||
func TestNetworkMapConcise(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user