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

Function TestAddPeer

consensus/vbft/peer_pool_test.go:54–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestAddPeer(t *testing.T) {
55 nodeId := "120202c924ed1a67fd1719020ce599d723d09d48362376836e04b0be72dfe825e24d81"
56 peerconfig := &vconfig.PeerConfig{
57 Index: uint32(1),
58 ID: nodeId,
59 }
60 peerpool := constructPeerPool(false)
61 res := peerpool.addPeer(peerconfig)
62 t.Logf("TestAddPeer : %v", res)
63}
64
65func TestGetActivePeerCount(t *testing.T) {
66 peerpool := constructPeerPool(true)

Callers

nothing calls this directly

Calls 2

constructPeerPoolFunction · 0.85
addPeerMethod · 0.80

Tested by

no test coverage detected