mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-06 20:13:47 +00:00
26 lines
536 B
Go
26 lines
536 B
Go
package network
|
|
|
|
import (
|
|
"testing"
|
|
|
|
p2ptest "github.com/ethereum/go-ethereum/p2p/testing"
|
|
)
|
|
|
|
func TestDiscovery(t *testing.T) {
|
|
addr := RandomAddr()
|
|
to := NewKademlia(addr.OAddr, NewKadParams())
|
|
pp := NewHive(NewHiveParams(), to)
|
|
ct := BzzCodeMap(HiveMsgs...)
|
|
s := newBzzTester(t, 1, addr, pp, ct, nil)
|
|
|
|
s.runHandshakes()
|
|
s.TestExchanges(p2ptest.Exchange{
|
|
Expects: []p2ptest.Expect{
|
|
p2ptest.Expect{
|
|
Code: 3,
|
|
Msg: &SubPeersMsg{ProxLimit: 0, MinProxBinSize: 8},
|
|
Peer: s.ExchangeSession.Id(1),
|
|
},
|
|
},
|
|
})
|
|
}
|