(hex string)
| 473 | } |
| 474 | |
| 475 | func nkFromHex(hex string) key.NodePublic { |
| 476 | if len(hex) != 64 { |
| 477 | panic(fmt.Sprintf("%q is len %d; want 64", hex, len(hex))) |
| 478 | } |
| 479 | k, err := key.ParseNodePublicUntyped(mem.S(hex[:64])) |
| 480 | if err != nil { |
| 481 | panic(fmt.Sprintf("%q is not hex: %v", hex, err)) |
| 482 | } |
| 483 | return k |
| 484 | } |
| 485 | |
| 486 | // an experiment to see if genLocalAddrFunc was worth it. As of Go |
| 487 | // 1.16, it still very much is. (30-40x faster) |
no test coverage detected
searching dependent graphs…