mirror of
https://github.com/bitmagnet-io/bitmagnet.git
synced 2026-07-26 06:01:03 -04:00
070f38120b
- Address https://github.com/bitmagnet-io/bitmagnet/issues/11 with BEP5 & BEP51 implementations - Reimplement DHT crawler around new routing table - Fix https://github.com/bitmagnet-io/bitmagnet/issues/45 - Fix https://github.com/bitmagnet-io/bitmagnet/issues/42 - Fix https://github.com/bitmagnet-io/bitmagnet/issues/39 - Fix https://github.com/bitmagnet-io/bitmagnet/issues/37 - Make bootstrap nodes configurable: https://github.com/bitmagnet-io/bitmagnet/issues/27 - Add profiling tools to Docker image
14 lines
301 B
Go
14 lines
301 B
Go
package dht
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"testing"
|
|
)
|
|
|
|
func TestUnmarshalNodeAddr(t *testing.T) {
|
|
var na NodeAddr
|
|
require.NoError(t, na.UnmarshalBinary([]byte("\x01\x02\x03\x04\x05\x06")))
|
|
assert.EqualValues(t, "1.2.3.4", na.IP.String())
|
|
}
|