mirror of
https://github.com/go-i2p/goSam.git
synced 2025-06-17 12:28:10 -04:00
it can't have a destination until one is filled
This commit is contained in:
@ -101,9 +101,12 @@ func (c *Client) Base32() string {
|
||||
}
|
||||
|
||||
func (c *Client) base64() []byte {
|
||||
s, _ := i2pB64enc.DecodeString(c.destination)
|
||||
alen := binary.BigEndian.Uint16(s[385:387])
|
||||
return s[:387+alen]
|
||||
if c.destination != "" {
|
||||
s, _ := i2pB64enc.DecodeString(c.destination)
|
||||
alen := binary.BigEndian.Uint16(s[385:387])
|
||||
return s[:387+alen]
|
||||
}
|
||||
return []byte("")
|
||||
}
|
||||
|
||||
// Base64 returns the base64 of the local tunnel
|
||||
|
@ -14,7 +14,6 @@ func setup(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("NewDefaultClient() Error: %q\n", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func teardown(t *testing.T) {
|
||||
@ -25,5 +24,6 @@ func teardown(t *testing.T) {
|
||||
|
||||
func TestClientHello(t *testing.T) {
|
||||
setup(t)
|
||||
t.Log(client.Base32())
|
||||
teardown(t)
|
||||
}
|
||||
|
Reference in New Issue
Block a user