MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestAddrHandle

Function TestAddrHandle

p2pserver/message/utils/msg_handler_test.go:664–674  ·  view source on GitHub ↗

TestAddrHandle tests Function AddrHandle handling a neighbor address response message

(t *testing.T)

Source from the content-addressed store, hash-verified

662
663// TestAddrHandle tests Function AddrHandle handling a neighbor address response message
664func TestAddrHandle(t *testing.T) {
665 nodeAddrs := []msgCommon.PeerAddr{}
666 buf := msgpack.NewAddrs(nodeAddrs)
667 msg := &types.MsgPayload{
668 Id: 0,
669 Addr: "127.0.0.1:50010",
670 Payload: buf,
671 }
672
673 AddrHandle(msg, network, nil)
674}
675
676// TestDataReqHandle tests Function DataReqHandle handling a data req(block/Transaction)
677func TestDataReqHandle(t *testing.T) {

Callers

nothing calls this directly

Calls 1

AddrHandleFunction · 0.85

Tested by

no test coverage detected